Part Number Hot Search : 
L2006V5 AK8788 MKE02Z64 M8R12FAJ 100AC VB025MSP C3216X7R IP125
Product Description
Full Text Search
 

To Download KSZ8851SNLI-TR Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  ksz8851-16/32mql/mqli single-port ethernet mac controller with 8/16-bit or 32-bit non-pci interface rev. 2.0 linkmd is a registered trademark of micrel, inc. magic packet is a trademark of advanced micro devices, inc. product names used in this datasheet are for identification purposes only and may be trademarks of their respective companies. micrel inc. 2180 fortune drive san jose, ca 95131 usa tel +1 ( 408 ) 944-0800 fax + 1 (408) 474-1000 http://www.micrel.com august 2009 m9999-083109-2.0 general description the ksz8851m-series is a single-port controller chip with a non-pci cpu interface and is available in 8/16-bit and 32-bit bus designs. this datasheet describes the 128-pin pqfp ksz8851-16/32mql for applications requiring high- performance from single-port ethernet controller with 8/16-bit or 32-bit generic processor interface. the ksz8851m offers the most cost-effective solution for adding high-throughput ethernet connectivity to traditional embedded systems. the ksz8851m is a single chip, mixed analog/digital device offering wake-on-lan technology for effectively addressing fast ethernet applications. it consists of a fast ethernet mac controller, an 8-bit, 16-bit and 32-bit generic host processor interface and incorporates a unique dynamic memory pointer with 4-byte buffer boundary and a fully utilizable 18kb for both tx (allocated 6kb) and rx (allocated 12kb) directions in host buffer interface. the ksz8851m is designed to be fully compliant with the appropriate ieee 802.3 standards. an industrial temperature-grade version of the ksz8851m, the ksz8851mqli is also available (see ordering information section). linkmd ? physical signal transmission and reception are enhanced through the use of analog circuitry, making the design more efficient and allowing for lower-power consumption. the ksz8851m is designed using a low-power cmos process that features a single 3.3v power supply with options for 1.8v, 2.5v or 3.3v vdd i/o. the device includes an extensive feature set that offers management information base (mib) counters and cpu control/data interfaces with single bus timing. the ksz8851m includes unique cable diagnostics feature called linkmd ? . this feature determines the length of the cabling plant and also ascertains if there is an open or short condition in the cable. accompanying software enables the cable length and cable conditions to be conveniently displayed. in addition, the ksz8851m supports hewlett packard (hp) auto-mdix thereby eliminating the need to differentiate between straight or crossover cables in applications. functional diagram figure 1. ksz8851-16/32mql/mqli functional diagram downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 2 m9999-083109-2.0 features ? integrated mac and phy ethernet controller fully compliant with ieee 802.3/802.3u standards ? designed for high performance and high throughput applications ? supports 10base-t/100base-tx ? supports ieee 802.3x full-duplex flow control and half- duplex backpressure collision flow control ? supports dma-slave burst data read and write transfers ? supports ip header (ipv4)/tcp/udp/icmp checksum generation and checking ? supports ipv6 tcp/udp/icmp checksum generation and checking ? automatic 32-bit crc generation and checking ? simple sram-like host interface easily connects to most common embedded mcus. ? supports multiple data frames for transmit and receive without address bus and byte-enable signals ? supports both big- and little-endian processors ? larger internal memory with 12k bytes for rx fifo and 6k bytes for tx fifo. programmable low, high and overrun watermark for flow control in rx fifo ? efficient architecture design with configurable host interrupt schemes to minimize host cpu overhead and utilization ? powerful and flexible address filtering scheme ? optional to use external serial eeprom configuration for both ksz8851-16mql and ksz8851-32mql ? single 25 mhz reference clock for both phy and mac ? hbm esd rating 6kv power modes, power supplies, and packaging ? single 3.3v power supply with options for 1.8v, 2.5v and 3.3v vdd i/o ? built-in integrated 3.3v or 2.5v to 1.8v low noise regulator for core and analog blocks ? enhanced power management feature with energy detect mode and power-down mode to ensure low- power dissipation during device idle periods ? comprehensive led indicator support for link, activity, full/half duplex, and 10/100 speed (4 leds) C user programmable ? low-power cmos design ? commercial temperature range: 0 o c to +70 o c ? industrial temperature range: C40 o c to +85 o c ? flexible package options available in 128-pin pqfp ksz8851-16/32mql or 48-pin lqfp ksz8851-16mll ? pin compatible with existing ksz8841-16/32mql and ksz8842-16/32mql in 128-pin additional features in addition to offering all of the features of a layer 2 controller, the ksz8851-16/32mql offers: ? flexible 8-bit, 16-bit and 32-bit generic host processor interfaces with same access time and single bus timing to any i/o registers and rx/tx fifo buffers ? supports to add two-byte before frame header in order for ip frame content with double word boundary ? micrel linkmd ? cable diagnostic capabilities to determine cable length, diagnose faulty cables, and determine distance to fault ? wake-on-lan functionality C incorporates magic packet?, network link state, and wake-up frame technology ? hp auto mdi-x? crossover with disable/enable option ? ability to transmit and receive frames up to 2000 bytes network features ? 10base-t and 100base-tx physical layer support ? auto-negotiation: 10/100 mbps full and half duplex ? adaptive equalizer ? baseline wander correction applications ? video/audio distribution systems ? high-end cable, satellite, and ip set-top boxes ? video over ip and iptv ? voice over ip (voip) and analog telephone adapters (ata) ? industrial control in latency critical applications ? home base station with ethernet connection ? industrial control sensor devices (temperature, pressure, levels, and valves) ? security, motion control and surveillance cameras markets ? fast ethernet ? embedded ethernet ? industrial ethernet ? embedded systems downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 3 m9999-083109-2.0 ordering information part number temperature range package lead free ksz8851-16mql 0oc to 70oc 128-pin pqfp pb-free ksz8851-32mql 0oc to 70oc 128-pin pqfp pb-free ksz8851-16mqli C40oc to +85oc 128-pin pqfp pb-free ksz8851-32mqli C40oc to +85oc 128-pin pqfp pb-free ksz8851-16mql-eval evaluation board for the ksz8851-16mql revision history revision date summary of changes 1.0 6/30/2008 first released information. 1.1 2/13/2009 improved eds rating up to 6kv, revised ordering information and updated table content and description. 2.0 8/31/2009 change revision id from 0 to 1 in cider (0xc0) register. update pins 24, 38, 43, 57, 63 and 91 description for 1.8v vdd_io supply. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 4 m9999-083109-2.0 contents pin configuration for 16-bit ............................................................................................................................... ................ 10 pin description for 16-bit ............................................................................................................................... .................... 11 pin configuration for 32-bit ............................................................................................................................... ................ 16 pin description for 32-bit ............................................................................................................................... .................... 17 strapping options ............................................................................................................................... ................................ 21 functional description ............................................................................................................................... ........................ 22 functional overview ............................................................................................................................... ............................ 22 power management.............................................................................................................. .......................................... 22 normal operation mode ......................................................................................................... ........................................ 22 energy detect mode ............................................................................................................ ........................................... 22 soft power down mode .......................................................................................................... ........................................ 23 power saving mode............................................................................................................. ........................................... 23 power down .................................................................................................................... ............................................... 23 wake-on-lan ............................................................................................................................... ........................................ 23 detection of energy ........................................................................................................... ............................................. 23 detection of linkup ........................................................................................................... .............................................. 24 wake-up packet ................................................................................................................ ............................................. 24 magic packet?................................................................................................................. .............................................. 24 physical layer transceiver (phy) ............................................................................................................................... ...... 24 100base-tx transmit ........................................................................................................... ........................................ 24 100base-tx receive ............................................................................................................ ........................................ 25 pll clock synthesizer (recovery).............................................................................................. ................................... 25 scrambler/de-scrambl er (100base-tx only) ...................................................................................... .......................... 25 10base-t transmit............................................................................................................. ........................................... 25 10base-t receive.............................................................................................................. ........................................... 25 mdi/mdi-x auto crossover ...................................................................................................... ...................................... 25 straight cable ............................................................................................................................... ........................... 26 crossover cable ............................................................................................................................... ....................... 26 auto negotiation .............................................................................................................. ............................................... 27 linkmd ? cable diagnostics............................................................................................................. ............................... 28 access....................................................................................................................... ............................................... 28 usage ........................................................................................................................ ............................................... 28 media access control (mac) operation ........................................................................................................................... 29 inter packet gap (ipg) ........................................................................................................ ........................................... 29 back-off algorithm............................................................................................................ .............................................. 29 late col lisio n .................................................................................................................................................................. 29 flow control.................................................................................................................. .................................................. 29 half-duplex backpressure...................................................................................................... ........................................ 29 address filtering function .................................................................................................... .......................................... 30 clock generator............................................................................................................... ............................................... 31 bus interface unit (biu) ............................................................................................................................... ....................... 31 supported transfers ........................................................................................................... ............................................ 31 physical da ta bus size ........................................................................................................ .......................................... 31 little and big en dian support ................................................................................................. ........................................ 32 asynchronous interface ........................................................................................................ .......................................... 32 biu summation................................................................................................................. .............................................. 32 queue management unit (qmu) ............................................................................................................................... ......... 33 downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 5 m9999-083109-2.0 transmit queue (txq) frame format ............................................................................................. .............................. 33 frame transmitting path operation in txq ...................................................................................... ............................. 34 driver routine for transmit packet from host processor to ksz8851m ............................................................ ........... 35 receive queue (rxq) frame format.............................................................................................. .............................. 38 frame receiving path operation in rxq......................................................................................... .............................. 38 driver routine for receive packet from ksz8851m to host processor ............................................................. ........... 39 eeprom interface ............................................................................................................................... ................................ 40 loopback support.............................................................................................................. ............................................. 41 near-end (remote) loopback .................................................................................................... .................................... 41 far-end (local) loopback ...................................................................................................... ........................................ 41 cpu interface i/o registers ............................................................................................................................... ................ 42 i/o registers................................................................................................................. .................................................. 42 internal i/o registers space mapping.......................................................................................... .................................. 43 register map: mac, phy and qmu ............................................................................................................................... .... 49 bit type definition........................................................................................................... ................................................ 49 0x00 C 0x05: reserved......................................................................................................... .......................................... 49 bus error status register (0x06 C 0x07): besr................................................................................. ........................... 49 chip configuration register (0x08 C 0x09): ccr ................................................................................ .......................... 49 0x0a C 0x0f: reserved ......................................................................................................... ......................................... 50 host mac address registers: marl, marm and marh ............................................................................... .............. 50 host mac address register low (0x10 C 0x11): marl............................................................................. ................... 50 host mac address register middle (0x12 C 0x13): marm.......................................................................... ................. 50 host mac address register high (0x14 C 0x15): marh ............................................................................ .................. 50 0x16 C 0x1f: reserved ......................................................................................................... ......................................... 51 on-chip bus control register (0x20 C 0x21): obcr .............................................................................. ...................... 51 eeprom control register (0x22 C 0x23): eepcr .................................................................................. ..................... 51 memory bist info register (0x24 C 0x25): mbir ................................................................................. ......................... 52 global reset register (0x26 C 0x27): grr ...................................................................................... ............................. 52 0x28 C 0x29: reserved......................................................................................................... .......................................... 52 wakeup frame control register (0x2a C 0x2b): wfcr ............................................................................. .................. 52 0x2c C 0x2f: reserved ......................................................................................................... ......................................... 53 wakeup frame 0 crc0 register (0x30 C 0x31): wf0crc0 ........................................................................... ............. 53 wakeup frame 0 crc1 register (0x32 C 0x33): wf0crc1 ........................................................................... ............. 53 wakeup frame 0 byte mask 0 regi ster (0x34 C 0x35): wf0bm0 ..................................................................... ........... 53 wakeup frame 0 byte mask 1 regi ster (0x36 C 0x37): wf0bm1 ..................................................................... ........... 54 wakeup frame 0 byte mask 2 regi ster (0x38 C 0x39): wf0bm2 ..................................................................... ........... 54 wakeup frame 0 byte mask 3 regi ster (0x3a C 0x 3b): wf0bm3..................................................................... ........... 54 0x3c C 0x3f: reserved ......................................................................................................... ......................................... 54 wakeup frame 1 crc0 register (0x40 C 0x41): wf1crc0 ........................................................................... ............. 54 wakeup frame 1 crc1 register (0x42 C 0x43): wf1crc1 ........................................................................... ............. 54 wakeup frame 1 byte mask 0 regi ster (0x44 C 0x45): wf1bm0 ..................................................................... ........... 54 wakeup frame 1 byte mask 1 regi ster (0x46 C 0x47): wf1bm1 ..................................................................... ........... 55 wakeup frame 1 byte mask 2 regi ster (0x48 C 0x49): wf1bm2 ..................................................................... ........... 55 wakeup frame 1 byte mask 3 regi ster (0x4a C 0x 4b): wf1bm3..................................................................... ........... 55 0x4c C 0x4f: reserved ......................................................................................................... ......................................... 55 wakeup frame 2 crc0 register (0x50 C 0x51): wf2crc0 ........................................................................... ............. 55 wakeup frame 2 crc1 register (0x52 C 0x53): wf2crc1 ........................................................................... ............. 55 wakeup frame 2 byte mask 0 regi ster (0x54 C 0x55): wf2bm0 ..................................................................... ........... 55 downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 6 m9999-083109-2.0 wakeup frame 2 byte mask 1 regi ster (0x56 C 0x57): wf2bm1 ..................................................................... ........... 56 wakeup frame 2 byte mask 2 regi ster (0x58 C 0x59): wf2bm2 ..................................................................... ........... 56 wakeup frame 2 byte mask 3 regi ster (0x5a C 0x 5b): wf2bm3..................................................................... ........... 56 0x5c C 0x5f: reserved ......................................................................................................... ......................................... 56 wakeup frame 3 crc0 register (0x60 C 0x61): wf3crc0 ........................................................................... ............. 56 wakeup frame 3 crc1 register (0x62 C 0x63): wf3crc1 ........................................................................... ............. 56 wakeup frame 3 byte mask 0 regi ster (0x64 C 0x65): wf3bm0 ..................................................................... ........... 56 wakeup frame 3 byte mask 1 regi ster (0x66 C 0x67): wf3bm1 ..................................................................... ........... 56 wakeup frame 3 byte mask 2 regi ster (0x68 C 0x69): wf3bm2 ..................................................................... ........... 57 wakeup frame 3 byte mask 3 regi ster (0x6a C 0x 6b): wf3bm3..................................................................... ........... 57 0x6c C 0x6f: reserved ......................................................................................................... ......................................... 57 transmit control register (0x70 C 0x71): txcr................................................................................. ........................... 57 transmit status register (0x72 C 0x73): txsr .................................................................................. ........................... 58 receive control register 1 (0x74 C 0x75): rxcr1 ............................................................................... ........................ 58 receive control register 2 (0x76 C 0x77): rxcr2 ............................................................................... ........................ 59 txq memory information register (0x78 C 0x79): txmir .......................................................................... .................. 60 0x7a C 0x7b: reserved ......................................................................................................... ......................................... 60 receive frame header status register (0x7c C 0x7d): rxfhsr .................................................................... ........... 60 receive frame header byte count register (0x7e C 0x7f): rxfhbcr............................................................... ....... 61 txq command register (0x80 C 0x81): txqcr ..................................................................................... ..................... 61 rxq command register (0x82 C 0x83): rxqcr..................................................................................... ..................... 61 tx frame data pointer register (0x84 C 0x85): txfdpr.......................................................................... ................... 62 rx frame data pointer register (0x86 C 0x87): rxfdpr.......................................................................... .................. 63 0x88 C 0x8b: reserved ......................................................................................................... ......................................... 63 rx duration timer threshold register (0x8c C 0x8d): rxdttr .................................................................... ............. 63 rx data byte count threshold register (0x8e C 0x8f): rxdbctr .................................................................. .......... 64 interrupt enable register (0x90 C 0x91): ier .................................................................................. .............................. 64 interrupt status register (0x92 C 0x93): isr .................................................................................. ............................... 65 0x94 C 0x9b: reserved ......................................................................................................... ......................................... 66 rx frame count & threshold register (0x9c C 0x9d): rxfctr..................................................................... ............ 66 tx next total frames size register (0x9e C 0x9f): txntfsr ..................................................................... .............. 66 mac address hash table register 0 (0xa0 C 0xa1): mahtr0....................................................................... ............. 66 mac address hash table register 1 (0xa2 C 0xa3): mahtr1....................................................................... ............. 66 mac address hash table register 2 (0xa4 C 0xa5): mahtr2....................................................................... ............. 67 mac address hash table register 3 (0xa6 C 0xa7): mahtr3....................................................................... ............. 67 0xa8 C 0xaf: reserved......................................................................................................... ......................................... 67 flow control low watermark register (0xb0 C 0xb1): fclwr...................................................................... .............. 67 flow control high watermark register (0xb2 C 0xb3): fchwr..................................................................... .............. 67 flow control overrun watermark register (0xb4 C 0xb5): fcowr.................................................................. ........... 67 0xb6 C 0xbf: reserved......................................................................................................... ......................................... 68 chip id and enable register (0xc0 C 0xc1): cider .............................................................................. ...................... 68 0xc2 C 0xc5: reserved ......................................................................................................... ........................................ 68 chip global control register (0xc6 C 0xc7): cgcr.............................................................................. ....................... 68 indirect access control register (0xc8 C 0xc9): iacr .......................................................................... ....................... 68 0xca C 0xcf: reserved ......................................................................................................... ........................................ 69 indirect access data low register (0xd0 C 0xd1): iadlr........................................................................ .................... 69 indirect access data high r egister (0xd2 C 0xd3): iadhr ....................................................................... ................... 69 power management event control register (0xd4 C 0xd5): pmecr.................................................................. ......... 69 downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 7 m9999-083109-2.0 go-sleep & wake-up time register (0xd6 C 0xd7): gswutr ........................................................................ ........... 70 phy reset register (0xd8 C 0xd9): phyrr ....................................................................................... ......................... 70 0xda C 0xdf: reserved ......................................................................................................... ........................................ 71 0xe0 C 0xe3: reserved ......................................................................................................... ......................................... 71 phy 1 mii-register basic control register (0xe4 C 0xe5): p1mbcr............................................................... ............ 71 phy 1 mii-register basic status register (0xe6 C 0xe7): p1mbsr ................................................................ ............ 72 phy 1 phy id low register (0xe8 C 0xe9): phy1ilr .............................................................................. ................... 72 phy 1 phy id high register (0xea C 0xeb): phy1ihr ............................................................................. .................. 72 phy 1 auto-negotiation advertisement register (0xec C 0xed): p1anar ........................................................... ...... 73 phy 1 auto-negotiation link partner abil ity register (0xee C 0xef): p1anlpr................................................... ...... 73 0xf0 C 0xf3: reserved ......................................................................................................... ......................................... 74 port 1 phy special control/status, linkmd ? (0xf4 C 0xf5): p1sclmd ...................................................................... 74 port 1 control register (0xf6 C 0xf7): p1cr................................................................................... ............................. 74 port 1 status register (0xf8 C 0xf9): p1sr .................................................................................... ............................. 76 0xfa C 0xff: reserved......................................................................................................... ......................................... 76 mib (management inform ation base) counters ............................................................................................................... 77 additional mib information .................................................................................................... ......................................... 78 absolute maximum ratings ............................................................................................................................... ................ 79 operating ratings ............................................................................................................................... ................................ 79 electrical characteristics ............................................................................................................................... .................... 79 timing specifications ............................................................................................................................... .......................... 81 asynchronous read and write timing ............................................................................................ ............................... 81 address latching timing for all modes ......................................................................................... ................................. 82 auto negotiation timing ....................................................................................................... .......................................... 83 reset timing.................................................................................................................. ................................................. 84 eeprom timing ................................................................................................................. ........................................... 85 selection of isolation transformers ............................................................................................................................... ... 86 selection of reference crystal ............................................................................................................................... ........... 86 package information ............................................................................................................................... ............................ 87 acronyms and glossary ............................................................................................................................... ...................... 88 downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 8 m9999-083109-2.0 list of figures figure 1. ksz8851-16/32mql/ mqli functional diagram ............................................................................ ......................... 1 figure 2.128-pin pqfp for 16-bit ............................................................................................... .......................................... 10 figure 3.128-pin pqfp for 32-bit ............................................................................................... .......................................... 16 figure 4. typical stra ight cable connection ................................................................................... .................................... 26 figure 5. typical crossover cable connection .................................................................................. ................................. 27 figure 6. auto negotiation and parallel operation ............................................................................. ................................. 28 figure 7. ksz8851m 8-bit, 16-bit, a nd 32-bit data bus connections ............................................................. ................... 33 figure 8. host tx single frame in manual enqueue flow diagram ................................................................. .................. 36 figure 9. host tx multiple frames in auto- enqueue flow diagram ............................................................... ................... 37 figure 10. host rx single or multiple frames in auto-dequeue flow diagram ..................................................... ............ 39 figure 11. phy port 1 near-end (remote) and host far-end (local) loopback paths ............................................... ....... 41 figure 12. asynchronous cycle ................................................................................................. .......................................... 81 figure 13. address latchin g cycle for all modes ............................................................................... ................................. 82 figure 14. auto negotiation timing ............................................................................................ ......................................... 83 figure 15. reset timing ....................................................................................................... ................................................ 84 figure 16. eeprom read cycle timing diagram ................................................................................... ........................... 85 figure 17. 128-pin pqfp package ............................................................................................... ....................................... 87 downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 9 m9999-083109-2.0 list of tables table 1. internal f unction blocks status ....................................................................................... ...................................... 22 table 2. mdi/mdi-x pin definitions ..................................................................................................................................... 26 table 3. address filtering scheme.............................................................................................. ........................................ 31 table 4. bus interface unit signal grouping.................................................................................... .................................... 32 table 5. frame format for transmit queue ....................................................................................... ................................. 33 table 6. transmit control word bit fields ...................................................................................... ..................................... 34 table 7. transmit byte count format............................................................................................ ...................................... 34 table 8. registers setting fo r transmit function block....................................................................................................... 35 table 9. frame format for receive queue ........................................................................................ ................................. 38 table 10. registers setting for receive function block......................................................................... ............................. 38 table 11. ksz8851m eeprom format ............................................................................................... ............................... 40 table 12. configparam word in eeprom format.................................................................................... .......................... 40 table 13. format of mib counters............................................................................................... ........................................ 77 table 14. port 1 mib counters indirect memory offsets ..................................................................................................... 78 table 15. electrical characteristics........................................................................................... ........................................... 80 table 16. asynchronous cycle timing parameters............................................................................................................. 81 table 17. address latching timing parameters.................................................................................................................. 82 table 18. auto negotiation timing parameters ................................................................................... ................................ 83 table 19. reset timing parameters .............................................................................................. ...................................... 84 table 20. eeprom timing parameters .............................................................................................................................. 85 table 21. transformer selection criteria ....................................................................................... ...................................... 86 table 22. qualified sing le port magnetics...................................................................................... ..................................... 86 table 23. typical reference crystal characteristics ........................................................................................................... 86 downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 10 m9999-083109-2.0 pin configuration for 16-bit figure 2. 128-pin pqfp for 16-bit downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 11 m9999-083109-2.0 pin description for 16-bit pin number pin name type pin function 1 test_en ipd test enable for normal operation, open or pull-down this pin to ground. 2 scan_en ipd scan test scan mux enable for normal operation, open or pull-down this pin to ground. 3 p1led2 opu 4 p1led1 ipu/o 5 p1led0 ipu/o port 1 led indicators 1 defined as follows: led is on when output is low; led is off when output is high. chip global control register: cgcr bit [15,9] [0,0] default [0,1] p1led3 2 p1led2 link/act 100link/act p1led1 full duplex/col 10link/act p1led0 speed full duplex reg. cgcr bit [15,9] [1,0] [1,1] p1led3 2 act p1led2 link p1led1 full duplex/col p1led0 speed notes: 1. link = on; activity = blink; link/act = on/blink; full dup/col = on/blink; full duplex = on (full duplex); off (half duplex) speed = on (100base-t); off (10base-t) 2. p1led3 is pin 27. 6 nc no connect. 7 nc no connect. 8 nc no connect. 9 dgnd gnd digital ground 10 vddio p 3.3v, 2.5v or 1.8v digital v ddio input power supply for io with well decoupling capacitors. 11 nc no connect. 12 nc no connect. 13 nc no connect. 14 pme ipu/o power management event: it is asserted (low or high depends on polarity set in pmecr register) when one of the wake-on-lan events is detected by ksz8851m. the ksz8851m is requesting the system to wake up from low power mode. 15 nc no connect. 16 intrn opu interrupt active low signal to host cpu to indicate an interrupt status bit is set. 17 ldevn opu local device not active low output signal, asserted when aen is low and a7-a1 decode to the ksz8851m right address register. ldevn is a combinational decode of the address and aen signal. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 12 m9999-083109-2.0 pin number pin name type pin function 18 rdn ipu read strobe not asynchronous read strobe, active low. 19 eecs opd eeprom chip select this signal is used to select an external eeprom device. 20 ardy opu asynchronous ready ardy may be used when interfacing asynchronous buses to extend bus access cycles. it is asynchronous to the host cpu or bus clock. this pin need an external 4.7k pull-up resistor. 21 nc no connect. 22 nc no connect 23 dgnd gnd digital io ground 24 vddco p 1.8v regulator output . this 1.8v output pin provides power t o pins 38, 43, 57 (vdda), 63 (vddap) and 91 (vddc) for core vdd supply. if vdd_io is set for 1.8v then this pin should be left floating, pins 38, 43, 57 (vdda), 63 (vddap) and 91 (vddc) will be sourced by the exte rnal 1.8v supply that is tied to pins 10, 79, 92, 108 and 125 (vddio) with appropriate filtering. 25 nc no connect. 26 eeen ipd eeprom enable eeprom is enabled and connected when this pin is pull-up. eeprom is disabled when this pin is pull-down or no connect. 27 p1led3 opd port 1 led indicator see the description in pins 3, 4, and 5. 28 eedo opd eeprom data out this pin is connected to di input of the serial eeprom. 29 eesk ipd/o eeprom serial clock: a 4 s (obcr[1:0]=11 on-chip bus speed @ 25mhz) or 800ns (obcr[1:0]=00 on-chip bus speed @ 125mhz) serial output clock cycle to load configuration data from the serial eeprom. config mode: the pull-up/pull-down value is latched as big or little endian mode during power-up / reset. see strapping options section for details 30 eedi ipd eeprom data in this pin is connected to do output of the serial eeprom when eeen is pull-up. this pin has to pull-down for 8-bit bus mode or pull-up for 16-bus mode when the eeen pin is pull-down (without eeprom). config mode: the pull-up/pull-down value is latched as 16- or 8-bit mode during power-up / reset. see strapping options section for details. 31 nc no connect. 32 aen ipu address enable address and chip select qualifier for the address decoding and chip enable, active low. 33 wrn ipu write strobe not asynchronous write strobe, active low. 34 dgnd gnd digital io ground 35 nc no connect. 36 pwrdn ipu full-chip power-down. active low (low = power down; high or flo ating = normal operation). all i/o pins will tri-state during chip power down. 37 agnd gnd analog ground downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 13 m9999-083109-2.0 pin number pin name type pin function 38 vdda p 1.8v analog power supply from vddco (pin 24) with appropriate filteri ng. if vddio is 1.8v, this pin must be supplied power from the same source as pins 10, 79, 92, 108 and 125 (vddio) with appropriate filtering. 39 agnd gnd analog ground 40 nc no connect 41 nc no connect 42 agnd gnd analog ground 43 vdda p 1.8v analog power supply from vddco (pin 24) with appropriate filteri ng. if vddio is 1.8v, this pin must be supplied power from the same source as pins 10, 79, 92, 108 and 125 (vddio) with appropriate filtering. 44 nc no connect 45 rxp1 i/o port 1 physical receive (mdi) or transmit (mdix) signal (+ differential) 46 rxm1 i/o port 1 physical receive (mdi) or transmit (mdix) signal (C differential) 47 agnd gnd analog ground 48 txp1 i/o port 1 physical transmit (mdi) or receive (mdix) signal (+ differential) 49 txm1 i/o port 1 physical transmit (mdi) or receive (mdix) signal (C differential) 50 vddatx p 3.3v analog v dd input power supply with well decoupling capacitors. 51 vddarx p 3.3v analog v dd input power supply with well decoupling capacitors. 52 nc no connect 53 nc no connect 54 agnd gnd analog ground 55 nc no connect 56 nc no connect 57 vdda p 1.8v analog power supply from vddco (pin 24) with appropriate filteri ng. if vddio is 1.8v, this pin must be supplied power from the same source as pins 10, 79, 92, 108 and 125 (vddio) with appropriate filtering. 58 agnd gnd analog ground 59 nc no connect (internal test only) 60 nc no connect (internal test only) 61 iset o set physical transmits output current. pull-down this pin with a 3.01k 1% resistor to ground. 62 agnd gnd analog ground 63 vddap p 1.8v analog power supply for pll from vddco (pin 24) with appropriate filtering. if vddio is 1.8v, this pin must be supplied power from the same source as pins 10, 79, 92, 108 and 125 (vddio) with appropriate filtering. 64 agnd gnd analog ground 65 x1 i 66 x2 o 25mhz crystal or oscillator clock connection. pins (x1, x2) connect to a crystal. if an oscillator is used, x1 connects to a 3.3v tolerant oscillator and x2 is a no connect. note: clock requirement is +/- 50ppm for either crystal or oscillator. 67 rstn ipu reset not hardware reset pin (active low). this reset input is required minimum of 10ms low after stable supply voltage 3.3v. 68 nc no connect. 69 nc no connect. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 14 m9999-083109-2.0 pin number pin name type pin function 70 nc no connect. 71 nc no connect. 72 nc no connect. 73 nc no connect. 74 nc no connect. 75 nc no connect. 76 a7 ipd address bus bit 7 77 a6 ipd address bus bit 6 78 dgnd gnd digital io ground 79 vddio p 3.3v, 2.5v or 1.8v digital v ddio input power supply for io with well decoupling capacitors. 80 a5 ipd address bus bit 5 81 a4 ipd address bus bit 4 82 a3 ipd address bus bit 3 83 a2 ipd address bus bit 2 84 a1 ipd address bus bit 1 85 nc no connect 86 nc no connect 87 be1n ipd byte enable 1 not, active low for data byte 1 enable (dont care in 8-bit bus mode). 88 be0n ipd byte enable 0 not, active low for data byte 0 enable. 89 nc no connect 90 dgnd gnd digital core ground 91 vddc p 1.8v digital core power supply from vddco (pin 24) with appropr iate filtering. if vddio is 1.8v, this pin must be supplied power from the same source as pins 10, 79, 92, 108 and 125 (vddio) with appropriate filtering. 92 vddio p 3.3v, 2.5v or 1.8v digital v ddio input power supply for io with well decoupling capacitors. 93 nc no connect 94 nc no connect 95 nc no connect 96 nc no connect 97 nc no connect 98 nc no connect 99 nc no connect 100 nc no connect 101 nc no connect 102 nc no connect 103 nc no connect 104 nc no connect 105 nc no connect 106 nc no connect 107 dgnd gnd digital io ground 108 vddio p 3.3v, 2.5v or 1.8v digital v ddio input power supply for io with well decoupling capacitors. 109 nc no connect 110 d15 i/o (pd) data bus bit 15 downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 15 m9999-083109-2.0 pin number pin name type pin function 111 d14 i/o (pd) data bus bit 14 112 d13 i/o (pd) data bus bit 13 113 d12 i/o (pd) data bus bit 12 114 d11 i/o (pd) data bus bit 11 115 d10 i/o (pd) data bus bit 10 116 d9 i/o (pd) data bus bit 9 117 d8 i/o (pd) data bus bit 8 118 d7 i/o (pd) data bus bit 7 119 d6 i/o (pd) data bus bit 6 120 d5 i/o (pd) data bus bit 5 121 d4 i/o (pd) data bus bit 4 122 d3 i/o (pd) data bus bit 3 123 dgnd gnd digital io ground 124 dgnd gnd digital core ground 125 vddio p 3.3v, 2.5v or 1.8v digital v ddio input power supply for io with well decoupling capacitors. 126 d2 i/o (pd) data bus bit 2 127 d1 i/o (pd) data bus bit 1 128 d0 i/o (pd) data bus bit 0 legend: p = power supply gnd = ground i/o = bi-directional i = input o = output. ipd = input with internal pull-down (58k +/-30%). ipu = input with internal pull-up (58k +/-30%). opd = output with internal pull-down (58k +/-30%). opu = output with internal pull-up (58k +/-30%). ipu/o = input with internal pull-up (58k +/- 30%) during power-up/reset ; output pin otherwise. ipd/o = input with internal pull-down (58k +/ -30%) during power-up/reset ; output pin otherwise. i/o (pd) = input/output with internal pull-down (58k 30%). downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 16 m9999-083109-2.0 pin configuration for 32-bit figure 3. 128-pin pqfp for 32-bit downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 17 m9999-083109-2.0 pin description for 32-bit pin number pin name type pin function 1 test_en i test enable for normal operation, pull-down this pin-to-ground. 2 scan_en i scan test scan mux enable for normal operation, pull-down this pin-to-ground. 3 p1led2 opu 4 p1led1 ipu/o 5 p1led0 ipu/o port 1 led indicators 1 defined as follows: led is on when output is low; led is off when output is high. chip global control register: cgcr bit [15,9] [0,0] default [0,1] p1led3 2 p1led2 link/act 100link/act p1led1 full duplex/col 10link/act p1led0 speed full duplex reg. cgcr bit [15,9] [1,0] [1,1] p1led3 2 act p1led2 link p1led1 full duplex/col p1led0 speed notes: 1. link = on; activity = blink; link/act = on/blink; full dup/col = on/blink; full duplex = on (full duplex); off (half duplex) speed = on (100base-t); off (10base-t) 2. p1led3 is pin 27. 6 nc no connect. 7 nc no connect. 8 nc no connect. 9 dgnd gnd digital ground 10 vddio p 3.3v, 2.5v or 1.8v digital v ddio input power supply for io with well decoupling capacitors. 11 nc no connect. 12 nc no connect. 13 nc no connect. 14 pme ipu/o power management event: it is asserted (low or high depends on polarity set in pmecr register) when one of the wake-on-lan events is detected by ksz8851m. the ksz8851m is requesting the system to wake up from low power mode. 15 nc no connect. 16 intrn opu interrupt active low signal to host cpu to indicate an interrupt status bit is set. 17 ldevn opu local device not active low output signal, asserted when aen is low and a7-a1 decode to the ksz8851m right address register. ldevn is a combinational decode of the address and aen signal. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 18 m9999-083109-2.0 pin number pin name type pin function 18 rdn ipu read strobe not asynchronous read strobe, active low. 19 eecs opd eeprom chip select this signal is used to select an external eeprom device. 20 ardy opu asynchronous ready ardy may be used when interfacing asynchronous buses to extend bus access cycles. it is asynchronous to the host cpu or bus clock. this pin need an external 4.7k pull-up resistor. 21 nc no connect. 22 nc no connect 23 dgnd gnd digital io ground 24 vddco p 1.8v regulator output . this 1.8v output pin provides power t o pins 38, 43, 57 (vdda), 63 (vddap) and 91 (vddc) for core vdd supply. if vdd_io is set for 1.8v then this pin should be left floating, pins 38, 43, 57 (vdda), 63 (vddap) and 91 (vddc) will be sourced by the exte rnal 1.8v supply that is tied to pins 10, 79, 92, 108 and 125 (vddio) with appropriate filtering. 25 nc no connect. 26 eeen ipd eeprom enable eeprom is enabled and connected when this pin is pull-up. eeprom is disabled when this pin is pull-down or no connect. 27 p1led3 opd port 1 led indicator see the description in pins 3, 4, and 5. 28 eedo opd eeprom data out this pin is connected to di input of the serial eeprom. 29 eesk ipd/o eeprom serial clock: a 4 s (obcr[1:0]=11 on-chip bus speed @ 25mhz) or 800ns (obcr[1:0]=00 on-chip bus speed @ 125mhz) serial output clock cycle to load configuration data from the serial eeprom. config mode: the pull-up/pull-down value is latched as big or little endian mode during power-up / reset. see strapping options section for details 30 eedi ipd eeprom data in this pin is connected to do output of the serial eeprom when eeen is pull-up. this pin is dont care (no connect) for 32-bit bus mode when eeen is pull-down (without eeprom). 31 nc no connect. 32 aen ipu address enable address and chip select qualifier for the address decoding and chip enable, active low. 33 wrn ipu write strobe not asynchronous write strobe, active low. 34 dgnd gnd digital io ground 35 nc no connect. 36 pwrdn ipu full-chip power-down. active low (low = power down; high or flo ating = normal operation). all i/o pins will tri-state during chip power down. 37 agnd gnd analog ground downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 19 m9999-083109-2.0 pin number pin name type pin function 38 vdda p 1.8v analog power supply from vddco (pin 24) with appropriate filteri ng. if vddio is 1.8v, this pin must be supplied power from the same source as pins 10, 79, 92, 108 and 125 (vddio) with appropriate filtering. 39 agnd gnd analog ground 40 nc no connect 41 nc no connect 42 agnd gnd analog ground 43 vdda p 1.8v analog power supply from vddco (pin 24) with appropriate filteri ng. if vddio is 1.8v, this pin must be supplied power from the same source as pins 10, 79, 92, 108 and 125 (vddio) with appropriate filtering. 44 nc no connect 45 rxp1 i/o port 1 physical receive (mdi) or transmit (mdix) signal (+ differential) 46 rxm1 i/o port 1 physical receive (mdi) or transmit (mdix) signal (C differential) 47 agnd gnd analog ground 48 txp1 i/o port 1 physical transmit (mdi) or receive (mdix) signal (+ differential) 49 txm1 i/o port 1 physical transmit (mdi) or receive (mdix) signal (C differential) 50 vddatx p 3.3v analog v dd input power supply with well decoupling capacitors. 51 vddarx p 3.3v analog v dd input power supply with well decoupling capacitors. 52 nc no connect 53 nc no connect 54 agnd gnd analog ground 55 nc no connect 56 nc no connect 57 vdda p 1.8v analog power supply from vddco (pin 24) with appropriate filteri ng. if vddio is 1.8v, this pin must be supplied power from the same source as pins 10, 79, 92, 108 and 125 (vddio) with appropriate filtering. 58 agnd gnd analog ground 59 nc no connect (internal test only) 60 nc no connect (internal test only 61 iset o set physical transmits output current. pull-down this pin with a 3.01k 1% resistor to ground. 62 agnd gnd analog ground 63 vddap p 1.8v analog power supply for pll from vddco (pin 24) with appropriate filtering. if vddio is 1.8v, this pin must be supplied power from the same source as pins 10, 79, 92, 108 and 125 (vddio) with appropriate filtering. 64 agnd gnd analog ground 65 x1 i 66 x2 o 25mhz crystal or oscillator clock connection. pins (x1, x2) connect to a crystal. if an oscillator is used, x1 connects to a 3.3v tolerant oscillator and x2 is a no connect. note: clock requirement is 50ppm for either crystal or oscillator. 67 rstn ipu reset not hardware reset pin (active low). this reset input is required minimum of 10 ms low after stable supply voltage 3.3v. 68 nc no connect. 69 nc no connect. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 20 m9999-083109-2.0 pin number pin name type pin function 70 nc no connect. 71 nc no connect. 72 nc no connect. 73 nc no connect. 74 nc no connect. 75 nc no connect. 76 a7 ipd address bus bit 7 77 a6 ipd address bus bit 6 78 dgnd gnd digital io ground 79 vddio p 3.3v, 2.5v or 1.8v digital v ddio input power supply for io with well decoupling capacitors. 80 a5 ipd address bus bit 5 81 a4 ipd address bus bit 4 82 a3 ipd address bus bit 3 83 a2 ipd address bus bit 2 84 a1 ipd address bus bit 1 85 be3n ipd byte enable 3 not, active low for data byte 3 enable. 86 be2n ipd byte enable 2 not, active low for data byte 2 enable. 87 be1n ipd byte enable 1 not, active low for data byte 1 enable. 88 be0n ipd byte enable 0 not, active low for data byte 0 enable. 89 d31 i/o (pd) data bus bit 31 90 dgnd gnd digital core ground 91 vddc p 1.8v digital core power supply from vddco (pin 24) with appropr iate filtering. if vddio is 1.8v, this pin must be supplied power from the same source as pins 10, 79, 92, 108 and 125 (vddio) with appropriate filtering. 92 vddio p 3.3v, 2.5v or 1.8v digital v ddio input power supply for io with well decoupling capacitors. 93 d30 i/o (pd) data bus bit 30 94 d29 i/o (pd) data bus bit 29 95 d28 i/o (pd) data bus bit 28 96 d27 i/o (pd) data bus bit 27 97 d26 i/o (pd) data bus bit 26 98 d25 i/o (pd) data bus bit 25 99 d24 i/o (pd) data bus bit 24 100 d23 i/o (pd) data bus bit 23 101 d22 i/o (pd) data bus bit 22 102 d21 i/o (pd) data bus bit 21 103 d20 i/o (pd) data bus bit 20 104 d19 i/o (pd) data bus bit 19 105 d18 i/o (pd) data bus bit 18 106 d17 i/o (pd) data bus bit 17 107 dgnd gnd digital io ground 108 vddio p 3.3v, 2.5v or 1.8v digital v ddio input power supply for io with well decoupling capacitors. 109 d16 i/o (pd) data bus bit 16 110 d15 i/o (pd) data bus bit 15 downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 21 m9999-083109-2.0 pin number pin name type pin function 111 d14 i/o (pd) data bus bit 14 112 d13 i/o (pd) data bus bit 13 113 d12 i/o (pd) data bus bit 12 114 d11 i/o (pd) data bus bit 11 115 d10 i/o (pd) data bus bit 10 116 d9 i/o (pd) data bus bit 9 117 d8 i/o (pd) data bus bit 8 118 d7 i/o (pd) data bus bit 7 119 d6 i/o (pd) data bus bit 6 120 d5 i/o (pd) data bus bit 5 121 d4 i/o (pd) data bus bit 4 122 d3 i/o (pd) data bus bit 3 123 dgnd gnd digital io ground 124 dgnd gnd digital core ground 125 vddio p 3.3v, 2.5v or 1.8v digital v ddio input power supply for io with well decoupling capacitors. 126 d2 i/o (pd) data bus bit 2 127 d1 i/o (pd) data bus bit 1 128 d0 i/o (pd) data bus bit 0 legend: p = power supply gnd = ground i/o = bi-directional i = input o = output. ipd = input with internal pull-down (58k +/-30%). ipu = input with internal pull-up (58k +/-30%). opd = output with internal pull-down (58k +/-30%). opu = output with internal pull-up (58k +/-30%). ipu/o = input with internal pull-up (58k +/- 30%) during power-up/reset ; output pin otherwise. ipd/o = input with internal pull-down (58k +/ -30%) during power-up/reset ; output pin otherwise. i/o (pd) = input/output with internal pull-down (58k 30%). strapping options pin number pin name type pin function 29 eesk ipd/o endian mode select: pull-up = big endian pull-down (default) = little endian during power-up / reset, this pin value is latched into register ccr, bit 10 . when this pin is no connect or tied to gnd, the bit 11 (endian mode selection) in rxfdpr register can be used to program either little (bit11=0 default) endian mode or big (bit11=1) endian mode. 30 eedi ipd bus mode select for ksz8851m when eeen pin is pull-down without eeprom pull-up = 16-bit bus mode pull-down or no connect (default) = 8-bit bus mode this pin is dont care (no connect) for 32-bit bus mode when eeen is pull-down (without eeprom). during power-up / reset, this pin value is latched into register ccr bit 6/ 7. note: ipu/o = input with internal pull-up (58k +/ -30%) during power-up/reset; output pin otherwise. ipd/o = input with internal pull-down (58k +/-30%) during power-up/ reset; output pin otherwise. pin strap-ins are latched during power-up or reset. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 22 m9999-083109-2.0 functional description the ksz8851m is a single-chip fast ethernet mac/phy controller consisting of a 10/100 physical layer transceiver (phy), a mac, and a bus interface unit (biu) that controls the ksz8851m via an 8-bit, 16-bit or 32- bit host bus interface. the ksz8851m is fully compliant to ieee802.3u standards. functional overview power management the ksz8851m supports enhanced power management feature in low power state with energy detection to ensure l ow- power dissipation during device idle periods. there are four operation modes under the power management function which is controlled by two bits in pmecr (0xd4) register as shown below: pmecr[1:0] = 00 normal operation mode pmecr[1:0] = 01 energy detect mode pmecr[1:0] = 10 soft power down mode pmecr[1:0] = 11 power saving mode table 1 indicates all internal function blocks status under four different power management operation modes. power management operation modes ksz8851m function blocks normal mode power saving mode energy detect mode soft power down mode internal pll clock enabled enabled disabled disabled tx/rx phy enabled rx unused block disabled energy detect at rx disabled mac enabled enabled disabled disabled host interface enabled enabled disabled disabled table 1. internal function blocks status normal operation mode this is the default setting bit[1:0]=00 in pmecr register after the chip power-up or hardware reset (pin 67). when ksz8851m is in this normal operation mode, all pll clocks are running, phy and mac are on and the host interface is ready for cpu read or write. during the normal operation mode, the host cpu can set the bit[1:0] in pmecr register to transit the cu rrent normal operation mode to any one of the other three power management operation modes. energy detect mode the energy detect mode provides a mechanism to save more power than in the normal operation mode when the ksz8851m is not connected to an active link partner. for example, if cable is not present or it is connected to a powered down partner, the ksz8851m can automatically enter to the low power state in energy detect mode. once activity resumes due to plugging a cable or attempting by the far end to establish link, the ksz8851m can automatically po wer up to normal power state in energy detect mode. energy detect mode consists of two states, normal power state and low power state. while in low power state, the ksz8851m reduces power consumption by disabling all circuitry except the energy detect circuitry of the receiver. t he energy detect mode is entered by setting bit[1:0]=01 in pmecr register. when the ksz8851m is in this mode, it will monitor the cable energy. if there is no energy on the cable for a time longer than pre-configured value at bit[7:0] go- sleep time in gswutr register, ksz8851m will go into a low power state. when ksz8851m is in low power state, it wi ll keep monitoring the cable energy. once the energy is detected from the cable and is continuously presented for a time longer than pre-configured value at bit[15:8] wake-up time in gswutr register, the ksz8851m will enter either the normal power state if the auto-wakeup enable bit[7] is set in pmecr register or the normal operation mode if both auto- wakeup enable bit[7] and wakeup to normal operation mode bit[6] are set in pmecr register. the ksz8851m will also assert pme output pin if the corresponding enable bit[8] is set in pmecr (0xd4) regis ter or downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 23 m9999-083109-2.0 generate interrupt to signal an energy detect event occurred if the corresponding enable bit[2] is set in ier (0x90) register. once the power management unit detects the pme output asserted or interrupt active, it will power up the host cpu and issue a wakeup command which is a read cycle to read the globe reset register (grr at 0x26) to wake up the ksz8851m from the low power state to the normal power state in case the auto-wakeup enable bit[7] is disabled. when ksz8851m is at normal power state, it is able to transmit or receive packet from the cable. soft power down mode the soft power down mode is entered by setting bit[1:0]=10 in pmecr register. when ksz8851m is in this mode, all pll clocks are disabled, the phy and the mac are off, all internal registers value will not change, and the hos t interface is only used to wake-up this device from current soft power down mode to normal operation mode. in order to go back the normal operation mode from this soft power down mode, the only way to leave this mode is through a host wake-up command which the cpu issues to read the globe reset register (grr at 0x26). power saving mode the power saving mode is entered when auto-negotiation mode is enabled, cable is disconnected, and by setting bit[1:0]=11 in pmecr register and bit [10]=1 in p1sclmd register. when ksz8851m is in this mode, all pll cloc ks are enabled, mac is on, all internal registers value will not change, and host interface is ready for cpu read or write. in th is mode, it mainly controls the phy transceiver on or off based on line status to achieve power saving. the ph y remains transmitting and only turns off the unused receiver block. once activity resumes due to plugg ing a cable or attempting by the far end to establish link, the ksz8851m can automatically enabled the phy power up to normal power state from power saving mode. during this power saving mode, the host cpu can program the bit[1:0] in pmecr register and set bit[10]=0 in p1sclmd register to transit the current power saving mode to any one of the other three power management operation modes. power down there is a full chip power-down mode if pwrdn (pin 36) is tied to low. when this pin is pulled-down, th e entire chip powers down. transitioning this pin from pull-down to pull-up results in a power up and chip res et. the reset will set all registers to default values. the host cpu will need to re-progr am all register values again after release of the pwrdn. wake-on-lan wake-up frame events are used to wake the system whenever meaningful data is presented to the system over the network. examples of meaningful data include the reception of a magic packet, a management request from a remote administrator, or simply network traffic directly targeted to the local system. in all of these instances, the network device i s pre-programmed by the policy owner or other software with information on how to identify wake fr ames from other network traffic. the ksz8851m controller can be programmed to notify the host of the wake-up frame detection with the assertion of the interrupt signal (intrn) or assertion of the power management event signal (pme). a wake-up event is a request for hardware and/or software external to the network devic e to put the system into a powered state (working). a wake-up signal is caused by: 1. detection of energy signal over a pre-configured value (bit 2 in isr register) 2. detection of a linkup in the network link state (bit 3 in isr register) 3. receipt of a magic packet (bit 4 in isr register) 4. receipt of a network wake-up frame (bit 5 in isr register) there are also other types of wake-up events that are not listed here as manufacturers may choose to implement these in their own way. detection of energy the energy is detected from the cable and is continuously presented for a time longer than pre-configured value, especially when this energy change may impact the level at which the system should re-enter to the normal powe r state. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 24 m9999-083109-2.0 detection of linkup link status wake events are useful to indicate a linkup in the networks connectivity status. wake-up packet wake-up packets are certain types of packets with specific crc values that a system recognizes as a wake up frame. the ksz8851m supports up to four users defined wake-up frames as below: 1. wake-up frame 0 is defined in wakeup frame registers (0x30 C 0x3b) and is enabled by bit 0 in wakeup frame control register (0x2a). 2. wake-up frame 1 is defined in wakeup frame registers (0x40 C 0x4b) and is enabled by bit 1 in wakeup frame control register (0x2a). 3. wake-up frame 2 is defined in wakeup frame registers (0x50 C 0x5b) and is enabled by bit 2 in wakeup frame control register (0x2a). 4. wake-up frame 3 is defined in wakeup frame registers (0x60 C 0x6b) and is enabled by bit 3 in wakeup frame control register (0x2a). magic packet? magic packet technology is used to remotely wake up a sleeping or powered off pc on a lan. this is accomplished by sending a specific packet of information, called a magic packet frame, to a node on the network. when a pc capable of receiving the specific frame goes to sleep, it enables the magic packet rx mode in the lan controller, and when the lan controller receives a magic packet frame, it will alert the system to wake up. magic packet is a standard feature integrated into the ksz8851m. the controller implements multiple advanced po wer- down modes including magic packet to conserve power and operate more efficiently. once the ksz8851m has been put into magic packet enable mode (wfcr[7]=1), it scans all incoming frames addressed to the node for a specific data sequence, which indicates to the controller this is a magic packet ( mp) frame. a magic packet frame must also meet the basic requirements for the lan technology chosen, such as source address (sa), destination address (da), which may be the receiving stations ieee address or a multicast or broadcast address and crc. the specific sequence consists of 16 duplications of the ieee address of this node, with no breaks or interruptions. this sequence can be located anywhere within the packet, but must be preceded by a synchronization stream. the synchronization stream allows the scanning state machine to be much simpler. the synchronization str eam is defined as 6 bytes of ffh. the device will also accept a broadcast frame, as long as the 16 duplications of the ieee address match the address of the machine to be awakened. example: if the ieee address for a particular node on a network is 11h 22h, 33h, 44h, 55h, 66h, the lan controller would be scanning for the data sequence (assuming an ethernet frame): destination source C misc - ff ff ff ff ff ff - 11 22 33 44 55 66 - 11 22 33 44 55 66 - 11 22 33 44 55 66 - 11 22 33 44 55 66 - 11 22 33 44 55 66 - 11 22 33 44 55 66 - 11 22 33 44 55 66 - 11 22 33 44 55 66 - 11 22 33 44 55 66 - 11 22 33 44 55 66 - 11 22 33 44 55 66 - 11 22 33 44 55 66 - 11 22 33 44 55 66 - 11 22 33 44 55 66 - 11 22 33 44 55 66 - 11 22 33 44 55 66 - misc - crc. there are no further restrictions on a magic packet frame. for instance, the sequence could be in a tcp/ip pac ket or an ipx packet. the frame may be bridged or routed across the network without affecting its ability to wake-up a node at the frames destination. if the lan controller scans a frame and does not find the specific sequence shown above, it discards the frame and takes no further action. if the ksz8851m controller detects the data sequence, however, it then alerts the pcs power management circuitry (assert the pme pin) to wake up the system. physical layer transceiver (phy) 100base-tx transmit the 100base-tx transmit function performs parallel-to-serial conversion, 4b/5b coding, scrambling, nrz-to-nrzi conversion, and mlt3 encoding and transmission. the circuitry starts with a parallel-to-serial conversion, whic h converts the mii data from the mac into a 125mhz serial bit downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 25 m9999-083109-2.0 stream. the data and control stream is then converted into 4b/5b coding, followed by a scrambler. the serialized data is further converted from nrz-to-nrzi format, and then transmitted in mlt3 current output. an external 3.01k (1%) resistor for the 1:1 transformer ratio sets the output current. the output signal has a typical rise/fall time of 4ns and complies with the ansi tp-pmd standard regar ding amplitude balance, overshoot, and timing jitter. the wave-shaped 10base-t output driver is also incorporated into the 100ba se-tx driver. 100base-tx receive the 100base-tx receiver function performs adaptive equalization, dc restoration, mlt3-to-nrzi conversion, data and clock recovery, nrzi-to-nrz conversion, de-scrambling, 4b/5b decoding, and serial-to-parallel co nversion. the receiving side starts with the equalization filter to compensate for inter-symbol interference (isi) over the twisted pair cable. since the amplitude loss and phase distortion is a function of the cable length, the equalizer has to adjust its characteristics to optimize performance. in this design, the variable equalizer makes an initial estimation based on comparisons of incoming signal strength against some known cable characteristics, and then t unes itself for optimization. this is an ongoing process and self-adjusts against environmental changes such as temperature variations. next, the equalized signal goes through a dc restoration and data conversion block. the dc restoration c ircuit is used to compensate for the effect of baseline wander and to improve the dynamic range. the differential data convers ion circuit converts the mlt3 format back to nrzi. the slicing threshold is also adaptive. the clock recovery circuit extracts the 125mhz clock from the edges of the nrzi signal. this recovered clock is then used to convert the nrzi signal into the nrz format. this signal is sent through the de-scrambler followed by the 4b/5b decoder. finally, the nrz serial data is converted to an mii format and provided as the input data to the mac. pll clock synthesizer (recovery) the internal pll clock synthesizer can generate either 125mhz, 62.5mhz, 41.66mhz, or 25mhz clocks by setting the o n- chip bus control register (0x20) for ksz8851m system timing. these internal clocks are generated from an external 25mhz crystal or oscillator. scrambler/de-scrambler (100base-tx only) the purpose of the scrambler is to spread the power spectrum of the signal to reduce electromagnetic interference (emi) and baseline wander. transmitted data is scrambled through the use of an 11-bit wide linear feedback shift register (lfsr). the scrambler generates a 2047-bit non-repetitive sequence. then the receiver de-scrambles the incoming data stream using the same sequence as at the transmitter. 10base-t transmit the 10base-t driver is incorporated with the 100base-tx driver to allow for transmission using the same magnetics. they are internally wave-shaped and pre-emphasized into outputs with typical 2.4v amplitude. the harmonic contents are at least 27 db below the fundamental frequency when driven by an all-ones manchester-encoded signal. 10base-t receive on the receive side, input buffers and level detecting squelch circuits are employed. a diffe rential input receiver circuit and a phase-locked loop (pll) perform the decoding function. the manchester-encoded data stream is separated into clock signal and nrz data. a squelch circuit rejects signals with levels less than 400mv or with short pulse widths to prevent noise at the rxp1 or rxm1 input from falsely triggering the decoder. when the input exceeds the squelch limit, the pll locks onto the incoming signal and the ksz8851m decodes a data frame. the receiver clock is maintained active during idle periods in between data reception. mdi/mdi-x auto crossover to eliminate the need for crossover cables between similar devices, the ksz8851m supports hp-auto mdi/mdi-x and ieee 802.3u standard mdi/mdi-x auto crossover. hp-auto mdi/mdi-x is the default. the auto-sense function detects remote transmit and receive pairs and correctly assigns the transmit and receive pairs for the ksz8851m device. this feature is extremely useful when end users are unaware of cable types in addition to saving on an additional uplink configuration connection. the auto-crossover feature can be disabled through the port control registers. the ieee 802.3u standard mdi and mdi-x definitions are as below: downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 26 m9999-083109-2.0 mdi mdi-x rj45 pins signals rj45 pins signals 1 td+ 1 rd+ 2 td- 2 rd- 3 rd+ 3 td+ 6 rd- 6 td- table 2. mdi/mdi-x pin definitions straight cable a straight cable connects an mdi device to an mdi-x device or an mdi-x device to an mdi device. the following diagram shows a typical straight cable connection between a network interface card (nic) and a switch, or hub (mdi-x). figure 4. typical straight cable connection crossover cable a crossover cable connects an mdi device to another mdi device, or an mdi-x device to another mdi-x device. the following diagram shows a typical crossover cable connection between two chips or hubs (two mdi-x devices). receive pair transmit pair receive pair 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 transmit pair modular connector (rj-45) nic straight cable 10/100 ethernet media dependent interface 10/100 ethernet media dependent interface modular connector (rj-45) hub (repeater or switch) downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 27 m9999-083109-2.0 receive pair receive pair transmit pair 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 transmit pair 10/100 ethernet media dependent interface 10/100 ethernet media dependent interface modular connector (rj-45) hub (repeater or switch) modular connector (rj-45) hub (repeater or switch) crossover cable figure 5. typical crossover cable connection auto negotiation the ksz8851m conforms to the auto negotiation protocol as described by the 802.3 committee to allow the port to operate at either 10base-t or 100base-tx. auto negotiation allows unshielded twisted pair (utp) link partners to select the best common mode of operation. in auto negotiation, the link partners advertise capabilities across the link to each other. if auto negotiation is not supported or th e link partner to the ksz8851m is forced to bypass auto negotiation, the mode is set by observing the signal at the r eceiver. this is known as parallel mode because while the transmitter is sending auto negotiation advertisements, the receiver is listening for advertisements or a fixed signal protocol. the link setup is shown in the following flow diagram (figure 6). downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 28 m9999-083109-2.0 force link setting listen for 10 base-t l i n k pulse s listen for 100 base-t x idles a ttempt auto negotiation link mode set b y p a s s a u t o n e g o t i a t i o n and set link mode link mode set ? parallel operation join flow no no yes yes start auto negotiation figure 6. auto negotiation and parallel operation linkmd ? cable diagnostics the ksz8851m linkmd ? uses time domain reflectometry (tdr) to analyze the cabling plant for common cabling problems such as open circuits, short circuits, and impedance mismatches. linkmd ? works by sending a pulse of known amplitude and duration down the mdi and mdi-x pairs and then analyzes the shape of the reflected signal. timing the pulse duration gives an indication of the distance to the cabling fault with a maximum distance of 200m and an accuracy of +/C2m. internal circuitry displays the tdr information in a user-readable digital format in register p1sclmd[8:0]. note: cable diagnostics are only valid for copper connections C fiber-optic operation is not supported. access linkmd ? is initiated by accessing register p1sclmd, the phy special control/status and linkmd ? register (0xf4). usage linkmd ? can be run at any time by ensuring that auto-mdix has been disabled. to disable auto-mdix, write a 1 to downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 29 m9999-083109-2.0 p1cr[10] to enable manual control over the pair used to transmit the linkmd ? pulse. the self-clearing cable diagnostic test enable bit, p1sclmd [12], is set to 1 to start the test on this pair. when bit p1sclmd[12] returns to 0, the test is complete. the test result is returned in bits p1sclmd[14:13] and the distance is returned in bits p1sclmd[8:0]. the cable diagnostic test results are as follows: 00 = valid test, normal condition 01 = valid test, open circuit in cable 10 = valid test, short circuit in cable 11 = invalid test, linkmd ? failed if p1sclmd[14:13]=11, this indicates an invalid test, and occurs when the ksz8851m is unable to shut do wn the link partner. in this instance, the test is not run, as it is not possible for the ksz8851m to determine if the detected s ignal is a reflection of the signal generated or a signal from another source. cable distance can be approximated by the following formula: p1sclmd[8:0] x 0.4m for port 1 cable distance this constant may be calibrated for different cabling conditions, including cables with a velocity of propagation that varies significantly from the norm. media access control (mac) operation the ksz8851m strictly abides by ieee 802.3 standards to maximize compatibility. inter packet gap (ipg) if a frame is successfully transmitted, then the minimum 96-bit time for ipg is measured between two consecutive packets. if the current packet is experiencing collisions, the minimum 96-bit time for ipg is measured from carrier sense (crs) to the next transmit packet. back-off algorithm the ksz8851m implements the ieee standard 802.3 binary exponential back-off algorithm in half-duplex mode. after 16 collisions, the packet is dropped. late collision if a transmit packet experiences collisions after 512 bit times of the transmission, the packet is dropped. flow control the ksz8851m supports standard 802.3x flow control frames on both transmit and receive sides. on the receive side, if the ksz8851m receives a pause control frame, the ksz8851m will not transmit the next normal frame until the timer, specified in the pause control frame, expires. if another pause frame is received b efore the current timer expires, the timer will be updated with the new value in the second pause frame. during this period (while it is flow controlled), only flow control packets from the ksz8851m are transmitted. on the transmit side, the ksz8851m has intelligent and efficient ways to determine when to invoke flow control. the flow control is based on availability of the system resources. there are three programmable low watermark register fclwr (0xb0), high watermark register fchwr (0xb2) and overrun watermark register fcowr (0xb4) for flow control in rxq fifo. the ksz8851m will send paus e frame when the rxq buffer hit the high watermark level (default 3.072 kbyte available) and stop pause frame when the rxq buffer hit the low watermark level (default 5.12 kbyte available). the ksz8851m will drop packet when the rxq buffer hit the overrun watermark level (default 256-byte available). the ksz8851m issues a flow control fram e (xoff, or transmitter of f), containing the maximum pause time defin ed in ieee standard 802.3x. once the resource is freed up, the ksz8851m sends out the another flow contro l frame (xon, or transmitter on) with zero pause time to turn off the flow control (turn on transmission to the port). a hysteresis feature is provided to prevent the flow control mechanism from being constantly activated and deactivated. half-duplex backpressure a half-duplex backpressure option (non-ieee 802.3 standards) is also provided. the activation and deactivation conditions are the same as in full-duplex mode. if backpressure is required, the ksz8851m sends preambles to defer the downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 30 m9999-083109-2.0 other stations' transmission (carrier sense deference). to avoid jabber and excessive deference (as defined in the 802.3 standard), after a certain time, the ksz8851m discontinues the carrier sense and then raises it again quickly. this short silent time (no carrier sense) preve nts other stations from sending out packets thus keeping other stations in a carrier sense deferred state. if the port has packets to send during a backpressure situation, the carrier sense type backpressure is interrupted and thos e packets are transmitted instead. if there are no additional packets to send, carrier sense type backpressure is reactivated again until chip resources free up. if a collision occurs, the binary exponential back-off algorithm is skipped and carri er sense is generated immediately, thus reducing the chance of further collision and carrier sense is maintained to prevent pac ket reception. address filtering function the ksz8851m supports 11 different address filtering schemes as shown in the following table 3. the ethernet destination address (da) field inside the packet is the first 6-byte field which uses to compare with either th e host mac address registers (0x10 C 0x15) or the mac address hash table registers (0xa0 C 0xa7) for address filtering operation. the first bit (bit 40) of the destination address (da) in the ethernet packet decides whether this is a physical address if bit 40 is 0 or a multicast address if bit 40 is 1. receive control register (0x74 C 0x75): rxcr1 item address filtering mode rx all (bit 4) rx inverse (bit 1) rx physical address (bit 11) rx multicast address (bit 8) description 1 perfect 0 0 1 1 all rx frames are passed only if the da exactly matches the mac address in marl, marm and marh registers. 2 inverse perfect 0 1 1 1 all rx frames are passed if the da is not matching the mac address in marl, marm and marh registers. 3 hash only 0 0 0 0 all rx frames with either multicast or physical destination address are filtering against the mac address hash table. 4 inverse hash only 0 1 0 0 all rx frames with either multicast or physical destination address are filtering not against the mac address hash table. all rx frames which are filtering out at item 3 (hash only) only are passed in this mode. 5 hash perfect (default) 0 0 1 0 all rx frames are passed with physical address (da) matching the mac address and to enable receive multicast frames that pass the hash table when multicast address is matching the mac address hash table. 6 inverse hash perfect 0 1 1 0 all rx frames which are filtering out at item 5 (hash perfect) only are passed in this mode. 7 promiscuous 1 1 0 0 all rx frames are passed without any conditions. 8 hash only with multicast address passed 1 0 0 0 all rx frames are passed with physical address (da) matching the mac address hash table and with multicast address without any conditions. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 31 m9999-083109-2.0 9 perfect with multicast address passed 1 0 1 1 all rx frames are passed with physical address (da) matching the mac address and with multicast address without any conditions. 10 hash only with physical address passed 1 0 1 0 all rx frames are passed with multicast address matching the mac address hash table and with physical address without any conditions. 11 perfect with physical address passed 1 0 0 1 all rx frames are passed with multicast address matching the mac address and with physical address without any conditions. notes: 1. bit 0 (rx enable), bit 5 (rx unicast enable) and bit 6 (rx multicast enable) must set to 1 in rxcr1 regis ter. 2. the ksz8851m will discard frame with sa same as the mac address if bit[0] is set in rxcr2 register. table 3. address filtering scheme clock generator the x1 and x2 pins are connected to a 25 mhz crystal. x1 can also serve as the connector to a 3.3v, 25 mhz oscillator (as described in the pin description). bus interface unit (biu) the biu host interface is a generic bus interface, designed to communicate with embedded processors. no glue logic is required when it talks to various standard asynchronous buses and processors. supported transfers in terms of transfer type, the biu can support asynchronous transfer or sram-like slave mode. to suppor t the data transfers, the biu provides a group of signals: asynchronous or sram-like signals: address/data (a[7:1]/d[15:0]), address enable (aen), read (rdn), wr ite (wrn), byte enable (be[3:0]n), async ready (ardy) and interrupt (intrn). physical data bus size the biu supports an 8-bit, 16-bit or 32-bit host standard data bus. depending on the size of the physical data bus, the ksz8851m can support 8-bit, 16-bit or 32-bit data transfers. for example, for a 32-bit system/host data bus, the ksz8851-32mql allows an 8-bit, 16-bit and 32-bit data transfer. for a 16-bit system/host data bus, the ksz8851-16mql allows an 8-bit and 16-bit data transfer. for an 8-bit system/host data bus, the ksz8851-16mql only allows an 8-bit data transfer. the ksz8851m supports internal data byte-swap and word-swap. this means that the system/host data b us hd[7:0] just connect to d[7:0] for an 8-bit data bus interface. for a 16-bit data bus, the system/host data bus hd[15:8] and hd[7:0] only need to connect to d[15:8] and d[7:0] respectively. table 4 describes the biu signal grouping. signal type function a[7:1] input address bus d[15:0] i/o data bus, for both ksz8851-32mql and ksz8851-16mql devices. d[31:16] i/o data bus, for ksz8851-32mql device only. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 32 m9999-083109-2.0 signal type function aen input address enable address enable asserted indicates memory address on the bus for dma access and since the device is an i/o device, address decoding is only enabled when aen is low. be3n, be2n, be1n, be0n input byte enable be0n be1n be2n be3n description 0 0 0 0 32-bit access 0 0 1 1 lower 16-bit (d[15:0]) access 1 1 0 0 higher 16-bit (d[31:16]) access 0 1 1 1 byte 0 (d[7:0]) access 1 0 1 1 byte 1 (d[15:8]) access 1 1 0 1 byte 2 (d[23:16]) access 1 1 1 0 byte 3 (d[31:24]) access intrn output interrupt rdn input asynchronous read wrn input asynchronous write ardy output asynchronous ready, this signal is asserted (low) to ask cpu inserting wait state. table 4. bus interface unit signal grouping note: the ldevn output signal will be asserted to indicate that the ksz8851m is successfully targeted. the si gnal ldevn is a combinatorial decode of aen and a[7:1]. little and big endian support the ksz8851m supports either little- or big-endian microprocessor. the external strap pin 29 (eesk) is used to select between two modes. the ksz8851m operates in little endian when this pin is pulled-down or in big endian when this pin is pulled-up. when this pin 29 is no connect or tied to gnd, the bit 11 (endian mode selection) in rxfdpr register can be used to program either little (bit11=0) endian mode or big (bit11=1) endian mode. asynchronous interface for asynchronous transfers, the asynchronous interface uses rdn (read) and wrn (write) signal strobes for data latching. if necessary, ardy is de-asserted on the falling edge of the strobe. all asynchronous transfers are either single-data or burst-data transfers. byte, word, and double word data buses and accesses (transfers) are supported. the biu, however, provides flexible asynchronous interfacing to communicate wi th various applications and architectures. no additional address latch is required. the biu decodes a[7:1] and qua lifies with aen (address enable) to determine if the ksz8851m device is the intended target. the host utilizes t he rising edge of rdn to latch read data and the ksz8851m will use falling edge of wrn to latch write data. biu summation figure 7 shows the connection for different data bus sizes. also refer to reference schematics in hardware design package. note: for the 8-bit data bus mode, the internal inverter is enabled and connected between be0n and be1n, so an even address will enable the be0n and an odd address will enable the be1n. strapping options: eesk (pin 29, ipd/o): pull-down or no connect (default) selects little endian. pull-up selects big end ian. eedi (pin 30, ipd): pull-down or no connect (default) selects 8-bit bus mode. pull-up selects 16- bit bus mode. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 33 m9999-083109-2.0 figure 7. ksz8851m 8-bit, 16-bit, and 32-bit data bus connections queue management unit (qmu) the queue management unit (qmu) manages packet traffic between the mac/phy interface and the system host. it has built-in packet memory for receive and transmit functions called txq (transmit queue) and rxq (rec eive queue). each queue contains 12kb for rxq and 6kb for txq of memory with back-to-back, non-blocking fram e transfer performance. it provides a group of control registers for system control, frame status registers for current pac ket transmit/receive status, and interrupts to inform the host of the real time tx/rx status. transmit queue (txq) frame format the frame format for the transmit queue is shown in the following table 5. the first word contains the control information for the frame to transmit. the second word is used to specify the total number of bytes of the frame. the packet data follows. the packet data area holds the frame itself. it may or may not include the crc checksum depending upon whether hardware crc checksum generation is enabled in txcr (bit 1) register. multiple frames can be pipelined in both the transmit queue and receive queue as long as there is enough queue m emory, thus avoiding overrun. for each transmitted frame, the transmit status information for the frame is located in the txsr (0x72) register. packet memory address offset bit 15 bit 0 2 nd byte 1 st byte 0 control word (high byte and low byte need to swap in big-endian mode) 2 byte count (high byte and low byte need to swap in big-endian mode) 4 - up transmit packet data (maximum size is 2000) table 5. frame format for transmit queue since multiple packets can be pipelined into the tx packet memory for transmit, the transmit status reflects the s tatus of the packet that is currently being transferred on the mac interface, which may or may not be the last queued packet in the tx queue. the transmit control word is the first 16-bit word in the tx packet memory, followed by a 16-bit byte count. it must be word aligned. each control word corresponds to one tx packet. table 6 gives the transmit control word bit fields. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 34 m9999-083109-2.0 bit description 15 txic transmit interrupt on completion when this bit is set, the ksz8851m sets the transmit interrupt after the present frame has been transmitted. 14-6 reserved. 5-0 txfid transmit frame id this field specifies the frame id that is used to identify the frame and its associated status information in the transmit status register. table 6. transmit control word bit fields the transmit byte count specifies the total number of bytes to be transmitted from the txq. its format is given in t able 7. bit description 15-11 reserved. 10-0 txbc transmit byte count transmit byte count. hardware uses the byte count information to conserve the tx buffer memory for better utilization of the packet memory. note: the hardware behavior is unknown if an incorrect byte count information is written to this field. writing a 0 value to this field is not permitted. table 7. transmit byte count format the data area contains six bytes of destination address (da) followed by six bytes of source ad dress (sa), followed by a variable-length number of bytes. on transmit, all bytes are provided by the cpu, including the source address. the ksz8851m does not insert its own sa. the 802.3 frame length word (frame type in ethernet) is not interpreted b y the ksz8851m. it is treated transparently as data both for transmit operations. frame transmitting path operation in txq this section describes the typical register settings for transmitting packets from hos t processor to ksz8851m with generic bus interface. user can use the default value for most of the transmit registers. the following table 8 describes a ll registers which need to be set and used for transmitting single or multiple frames. register name [bit](offset) description txcr[3:0](0x70) txcr[8:5](0x70) set transmit control function as below: set bit 3 to enable transmitting flow control. set bit 2 to enable transmitting padding. set bit 1 to enable transmitting crc. set bi t 0 to enable transmitting block operation. set transmit checksum generation for icmp, udp, tcp and ip packet. txmir[12:0](0x78) the amount of free transmit memory available is represented in units of byte. the txq memory (6 kbyte) is used for both frame payload and control word. txqcr[0](0x80) for single frame to transmit, set this bit 0 = 1(manual enqueue). the ksz8851m will enable current tx frame prepared in the tx buffer is queued for transmit, this is only transmit one frame at a time. note: this bit is self-clearing after the frame is finished transmitting. the software should wait for the bit to be cleared before setting up another new tx frame. txqcr[1](0x80) when this bit is written as 1, the ksz8851m will generate interrupt (bit 6 in isr register) to cpu when txq memory is available based upon the total amount of txq space requested by cpu at txntfsr (0x9e) register. note: this bit is self-clearing after the frame is finish ed transmitting. the software should wait for the bit to be cleared before set to 1 again txqcr[2](0x80) for multiple frames to transmit, set this bit 2 = 1 (auto-enqueue). the ksz8851m will enable current all tx frames prepared in the tx buffer are queued to transmit automatically. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 35 m9999-083109-2.0 register name [bit](offset) description rxqcr[3](0x82) set bit 3 to start dma access from host cpu eith er read (receive frame data) or write (transmit data frame) txfdpr[14](0x84) set bit 14 to enable txq transmit frame data pointer register increments automatically on accesses to the data register. ier[14][6](0x90) set bit 14 to enable transmit interrupt in interrupt enable register set bit 6 to enable transmit space available interrupt in interrupt enable register. isr[15:0](0x92) write 1 (0xffff) to clear all interrupt status bits after interrupt occurred in interrupt status register. txntfsr[15:0](0x9e) the host cpu is used to program the total amount of txq buffer space which is required for next total transmit frames size in double-word count. table 8. registers setting for transmit function block driver routine for transmit packet from host processor to ksz8851m the transmit routine is called by the upper layer to transmit a contiguous block of data through the ethernet controll er. it is users choice to decide how the transmit routine is implemented. if the ethernet controller encounters an error while transmitting the frame, its the users choice to decide whether the driver should attempt to retransmit the same frame or discard the data. the following figures 8 and 9 shows the step-by-step for single and multiple transmit packets from host processor to ksz8851m. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 36 m9999-083109-2.0 figure 8. host tx single frame in manual enqueue flow diagram host receives an ethernet pkt from upper layer and prepares transmit pkt data (data, data_length, frame id). the transmit queue frame format is shown in table 5 check if ksz8851m txq memory size is available for this transmit pkt? (read txmir reg) write an 1?to rxqcr[3] reg to enable txq write access, then host starts write transmit data (control word, byte count and pkt data) to txq memory. this is moving transmit data from host to ksz8851m txq memory until whole pkt is finished write an 0?to rxqcr[3] reg to end txq write access write an 1?to txqcr[0] reg to issue a transmit command (manual-enqueue) to the txq. the txq will transmit this pkt data to the phy port option to read isr[14] reg, it indicates that the txq has completed to transmit at least one pkt to the phy port, then write 1?to clear this bit yes no write the total amount of txq buffer space which is required for next transmit frame size in double-word count in txntfsr[15:0] register set bit 1=1 in txqcr register to enable the txq memory available monitor wait for interrupt and check if the bit 6=1 (memory space available) in isr register ? yes no downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 37 m9999-083109-2.0 figure 9. host tx multiple frames in auto- enqueue flow diagram host receives an multiple ethernet pkts from upper layer and prepares transmit pkts data (data, data_length, frame id). each transmit queue frame format is shown in table 5 write an 1?to txqcr[2] reg to issue a transmit command (auto- enqueue) to the txq. the txq will transmit all data to the phy port check if ksz8851m txq memory size is available for these transmit pkts? (read txmir reg) write an 1?to rxqcr[3] reg to enable txq write access, then host starts write transmit data (control word, byte count and pkt data) to txq memory. this is moving transmit data from host to ksz8851m txq memory until all pkts are finished write an 0?to rxqcr[3] reg to end txq write access option to read isr[14] reg, it indicates that the txq has completed to transmit all pkts to the phy port, then write 1?to clear this bit yes no write the total amount of txq buffer space which is required for next transmit total frames size in double- word count in txntfsr[15:0] register set bit 1=1 in txqcr register to enable the txq memory available monitor wait for interrupt and check if the bit 6=1 (memory space available) in isr register ? yes no downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 38 m9999-083109-2.0 receive queue (rxq) frame format the frame format for the receive queue is shown in table 9. the first word contains the status infor mation for the frame received. the second word is the total number of bytes of the rx frame. following that is the packet data area. th e packet data area holds the frame itself. it includes the crc checksum. packet memory address offset bit 15 bit 0 2 nd byte 1 st byte 0 status word (high byte and low byte need to swap in big- endian mode. also see description in rxfhsr register) 2 byte count (high byte and low byte need to swap in big- endian mode. also see description in rxfhbcr register) 4 - up receive packet data (maximum size is 2000) table 9. frame format for receive queue frame receiving path operation in rxq this section describes the typical register settings for receiving packets from ksz8851m to hos t processor with generic bus interface. user can use the default value for most of the receive registers. the following table 10 describes all registers which need to be set and used for receiving single or multiple frames. register name[bit](offset) description rxcr1(0x74) rxcr2(0x76) set receive control function as below: set rxcr1[10] to enable receiving flow control. set rxcr1[0] to enable receiving block operation. set receive checksum check for icmp, udp, tcp and ip packet. set receive address filtering scheme as shown in the table 3. rxfhsr[15:0](0x7c) this register (read only) indicates the current received frame header status information. rxfhbcr[11:0](0x7e) this register (read only) indicates the current received frame header byte count information. rxqcr[12:3](0x82) set rxq control function as below: set bit 3 to start dma access from host cpu either read (receive frame data) or write (transmit data frame). set bit 4 to automatically enable rxq frame buffer dequeue. set bit 5 to enable rx frame count threshold and read bit 10 for status. set bit 6 to enable rx data byte count threshold and read bit 11 for status. set bit 7 to enable rx frame duration timer threshold and read bit 12 for status. set bit 9 enable rx ip header two-byte offset. rxfdpr[14](0x86) set bit 14 to enable rxq address register increments automatically on accesses to the data register. rxdttr[15:0](0x8c) to program received frame duration timer value. when rx frame duration in rxq exceeds this threshold in 1s interval count and bit 7 of rxqcr register is set to 1, the ksz8851m will generate rx interrupt in isr[13] and indicate the status in rxqcr[12]. rxdbctr[15:0](0x8e) to program received data byte count value. when the number of received bytes in rxq exceeds this threshold in byte count and bit 6 of rxqcr register is set to 1, the ksz8851m will generate rx interrupt in isr[13] and indicate the status in rxqcr[11]. ier[13](0x90) set bit 13 to enable receive interrupt in interrupt enable register. isr[15:0](0x92) write 1 (0xffff) to clear all interrupt status bits after interrupt occurred in interrupt status register. rxfctr[15:8](0x9c) rx frame count read only. to indicate the total received frame in rxq frame buffer when receive interrupt (bit 13 in isr) occurred. rxfctr[7:0](0x9c) to program received frame count value. when the number of received frames in rxq exceeds this threshold value and bit 5 of rxqcr register is set to 1, the ksz8851m will generate rx interrupt in isr[13] and indicate the status in rxqcr[10]. table 10. registers setting for receive function block downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 39 m9999-083109-2.0 driver routine for receive packet from ksz8851m to host processor the software driver receives data packet frames from the ksz8851m device either as a resul t of polling or an interrupt based service. when an interrupt is received, the os invokes the interrupt service routine that is in the interrupt vector table. if your system has os support, to minimize interrupt lockout time, the interrupt service routine s hould handle at interrupt level only those tasks that require minimum execution time, such as error checking or device status change. the routine should queue all the time-consuming work to transfer the packet from the ksz8851m rxq into system memory at task level. the following figure 10 shows the step-by-step for receive packets from ksz8851m to host processor. note: each dma read operation from the host cpu to read rxq frame buffer, the first read data (byte in 8-bit bus mode, word in 16-bit bus mode and double word in 32-bit bus mode) is dummy data and must be discarded by host cpu. afterward, host cpu must read each frame data to align with double word boundary at end. for example, the host cpu has to read up to 68 bytes if received frame size is 65 bytes. figure 10. host rx single or multiple frames in auto-dequeue flow diagram downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 40 m9999-083109-2.0 in order to read received frames from rxq without error, the software driver must use following steps: 1. when receive interrupt occurred and software driver writes 1 to clear the rx interrupt in isr regist er; the ksz8851 will update receive frame counter (rxfctr) register for this interrupt. 2. when software driver reads back receive frame count (rxfctr) register; the ksz8851 will update both receive frame header status and byte count registers (rxfhsr/rxfhbcr). 3. when software driver reads back both receive frame header status and byte count registers (rxfhsr/rxfhbcr); the ksz8851 will update next receive frame header status and byte count reg isters (rxfhsr/rxfhbcr). eeprom interface it is optional in the ksz8851m to use an external eeprom. in the case that an eeprom is not used, the eeen pin must be tied low or floating. an external serial eeprom with a standard microwire bus interface is used for non-volatile storage of information su ch as the host mac address and default configuration setting for 8-bit or 16-bit bus width. the ksz8851m can detect if the eeprom is a 1kb (93c46) or 4kb (93c66) eeprom device (the 93c46 and the 93c66 are typical eeprom devices). the eeprom must be organized as 16-bit mode. if the eeen pin is pulled high, then the ksz8851m performs an automatic read of the external eeprom words 0h to 6h after the de-assertion of reset. the eeprom values are placed in certain host-accessible register s. eeprom read/write functions can also be performed by software read/writes to the eepcr (0x22) registers. the ksz8851m eeprom format is given in table 11. word 15 8 7 0 0h reserved 1h host mac address byte 2 host mac address byte 1 2h host mac address byte 4 host mac address byte 3 3h host mac address byte 6 host mac address byte 5 4h C 5h reserved 6h configparam (see table 12) 7h-3fh not used for ksz8851m (available for user to use) table 11. ksz8851m eeprom format the format for configparam is shown in table 12. bit bit name description 15 - 1 reserved reserved 0 asyn_8bit async 8-bit bus select 1= bus is configured for 16-bit width 0= bus is configured for 8-bit width this bit is shown in either bit 7 or bit 6 of ccr register the ksz8851-32mql 32-bit device does not care this bit setting table 12. configparam word in eeprom format downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 41 m9999-083109-2.0 loopback support the ksz8851m provides two loopback modes, one is near-end (remote) loopback to support for remote diagnostic of failure at line side, and the other is far-end (local) loopback to support for local diagnostic of failure at host side. i n loopback mode, the speed at the phy port will be set to 100base-tx full-duplex mode. near-end (remote) loopback near-end (remote) loopback is conducted at phy port 1 of the ksz8851m. the loopback path starts at the phy ports receive inputs (rxp1/rxm1), wraps around at the same phy ports pmd/pma, and ends at the phy ports trans mit outputs (txp1/txm1). bit [9] of register p1sclmd (0xf4) is used to enable near-end loopback. the ports 1 near-end loopback path is illustr ated in the following figure 11. far-end (local) loopback far-end (local) loopback is conducted at host of the ksz8851m. the loopback path starts at the host ports transmit inputs (tx data), wraps around at the phy ports pmd/pma, and ends at the host ports receive outputs (rx data) bit [14] of register p1mbcr (0xe4) is used to enable far-end loopback at host side. the host far-end loopback path is illustrated in the following figure 11. figure 11. phy port 1 near-end (remote) and host far-end (local) loopback paths downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 42 m9999-083109-2.0 cpu interface i/o registers the ksz8851m provides an sram-like asynchronous bus interface for the cpu to access its internal i/o registers. i/o registers serve as the address that the microprocessor uses when communicating with the device. this is used for configuring operational settings, reading or writing control, status information, and transferring packets. t he ksz8851m can be programmed to interface with either big-endian or little-endian processor. i/o registers the following i/o space mapping tables apply to 8-, 16- or 32-bit bus interface. depending upon the bus interface used and byte enable signals (be[3:0]n control byte access input pins), each i/o access can be performed the fol lowing operations as an 8-bit for 256 address locations, 16-bit for 128 address locations or 32-bit for 64 address loc ations. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 43 m9999-083109-2.0 internal i/o registers space mapping i/o register offset location 32-bit 16-bit 8-bit register name default value description 0x00 - 0x01 0x00 0x01 0x00 to 0x03 0x02 - 0x03 0x02 0x03 reserved dont care none 0x04 - 0x05 0x04 0x05 reserved dont care none 0x04 to 0x07 0x06 - 0x07 0x06 0x07 besr 0x0000 bus error status register [7:0] bus error status register [15:8] 0x08 - 0x09 0x08 0x09 ccr read only chip configuration register [7:0] chip configuration register [15:8] 0x08 to 0x0b 0x0a - 0x0b 0x0a 0x0b reserved dont care none 0x0c - 0x0d 0x0c 0x0d 0x0c to 0x0f 0x0e - 0x0f 0x0e 0x0f reserved dont care none 0x10 - 0x11 0x10 0x11 marl - mac address register low [7:0] mac address register low [15:8] 0x10 to 0x13 0x12 - 0x13 0x12 0x13 marm - mac address register middle [7:0] mac address register middle [15:8] 0x14 - 0x15 0x14 0x15 marh - mac address register high [7:0] mac address register high [15:8] 0x14 to 0x17 0x16 - 0x17 0x16 0x17 reserved dont care none 0x18 - 0x19 0x18 0x19 0x18 to 0x1b 0x1a - 0x1b 0x1a 0x1b reserved dont care none 0x1c - 0x1d 0x1c 0x1d 0x1c to 0x1f 0x1e - 0x1f 0x1e 0x1f reserved dont care none 0x20 - 0x21 0x20 0x21 obcr 0x0000 on-chip bus control register [7:0] on-chip bus control register [15:8] 0x20 to 0x23 0x22 - 0x23 0x22 0x23 eepcr 0x0000 eeprom control register [7:0] eeprom control register [15:8] 0x24 - 0x25 0x24 0x25 mbir 0x1010 memory bist info register [7:0] memory bist info register [15:8] 0x24 to 0x27 0x26 - 0x27 0x26 0x27 grr 0x0000 global reset register [7:0] global reset register [15:8] 0x28 - 0x29 0x28 0x29 reserved dont care none 0x28 to 0x2b 0x2a - 0x2b 0x2a 0x2b wfcr 0x0000 wakeup frame control register [7:0] wakeup frame control register [15:8] 0x2c - 0x2d 0x2c 0x2d 0x2c to 0x2f 0x2e - 0x2f 0x2e 0x2f reserved dont care downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 44 m9999-083109-2.0 i/o register offset location 32-bit 16-bit 8-bit register name default value description 0x30 - 0x31 0x30 0x31 wf0crc0 0x0000 wakeup frame 0 crc0 register [7:0] wakeup frame 0 crc0 register [15:8] 0x30 to 0x33 0x32 - 0x33 0x32 0x33 wf0crc1 0x0000 wakeup frame 0 crc1 register [7:0] wakeup frame 0 crc1 register [15:8] 0x34 - 0x35 0x34 0x35 wf0bm0 0x0000 wakeup frame 0 byte mask 0 register [7:0] wakeup frame 0 byte mask 0 register [15:8] 0x34 to 0x37 0x36 - 0x37 0x36 0x37 wf0bm1 0x0000 wakeup frame 0 byte mask 1 register [7:0] wakeup frame 0 byte mask 1 register [15:8] 0x38 - 0x39 0x38 0x39 wf0bm2 0x0000 wakeup frame 0 byte mask 2 register [7:0] wakeup frame 0 byte mask 2 register [15:8] 0x38 to 0x3b 0x3a - 0x3b 0x3a 0x3b wf0bm3 0x0000 wakeup frame 0 byte mask 3 register [7:0] wakeup frame 0 byte mask 3 register [15:8] 0x3c - 0x3d 0x3c 0x3d 0x3c to 0x3f 0x3e - 0x3f 0x3e 0x3f reserved dont care none 0x40 - 0x41 0x40 0x41 wf1crc0 0x0000 wakeup frame 1 crc0 register [7:0] wakeup frame 1 crc0 register [15:8] 0x40 to 0x43 0x42 - 0x43 0x42 0x43 wf1crc1 0x0000 wakeup frame 1 crc1 register [7:0] wakeup frame 1 crc1 register [15:8] 0x44 - 0x45 0x44 0x45 wf1bm0 0x0000 wakeup frame 1 byte mask 0 register [7:0] wakeup frame 1 byte mask 0 register [15:8] 0x44 to 0x47 0x46 - 0x47 0x46 0x47 wf1bm1 0x0000 wakeup frame 1 byte mask 1 register [7:0] wakeup frame 1 byte mask 1 register [15:8] 0x48 - 0x49 0x48 0x49 wf1bm2 0x0000 wakeup frame 1 byte mask 2 register [7:0] wakeup frame 1 byte mask 2 register [15:8] 0x48 to 0x4b 0x4a - 0x4b 0x4a 0x4b wf1bm3 0x0000 wakeup frame 1 byte mask 3 register [7:0] wakeup frame 1 byte mask 3 register [15:8] 0x4c - 0x4d 0x4c 0x4d 0x4c to 0x4f 0x4e - 0x4f 0x4e 0x4f reserved dont care none 0x50 - 0x51 0x50 0x51 wf2crc0 0x0000 wakeup frame 2 crc0 register [7:0] wakeup frame 2 crc0 register [15:8] 0x50 to 0x53 0x52 - 0x53 0x52 0x53 wf2crc1 0x0000 wakeup frame 2 crc1 register [7:0] wakeup frame 2 crc1 register [15:8] 0x54 - 0x55 0x54 0x55 wf2bm0 0x0000 wakeup frame 2 byte mask 0 register [7:0] wakeup frame 2 byte mask 0 register [15:8] 0x54 to 0x57 0x56 - 0x57 0x56 0x57 wf2bm1 0x0000 wakeup frame 2 byte mask 1 register [7:0] wakeup frame 2 byte mask 1 register [15:8] 0x58 - 0x59 0x58 0x59 wf2bm2 0x0000 wakeup frame 2 byte mask 2 register [7:0] wakeup frame 2 byte mask 2 register [15:8] 0x58 to 0x5b 0x5a - 0x5b 0x5a 0x5b wf2bm3 0x0000 wakeup frame 2 byte mask 3 register [7:0] wakeup frame 2 byte mask 3 register [15:8] 0x5c - 0x5d 0x5c 0x5d 0x5c to 0x5f 0x5e - 0x5f 0x5e 0x5f reserved dont care none downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 45 m9999-083109-2.0 i/o register offset location 32-bit 16-bit 8-bit register name default value description 0x60 - 0x61 0x60 0x61 wf3crc0 0x0000 wakeup frame 3 crc0 register [7:0] wakeup frame 3 crc0 register [15:8] 0x60 to 0x63 0x62 - 0x63 0x62 0x63 wf3crc1 0x0000 wakeup frame 3 crc1 register [7:0] wakeup frame 3 crc1 register [15:8] 0x64 - 0x65 0x64 0x65 wf3bm0 0x0000 wakeup frame 3 byte mask 0 register [7:0] wakeup frame 3 byte mask 0 register [15:8] 0x64 to 0x67 0x66 - 0x67 0x66 0x67 wf3bm1 0x0000 wakeup frame 3 byte mask 1 register [7:0] wakeup frame 3 byte mask 1 register [15:8] 0x68 - 0x69 0x68 0x69 wf3bm2 0x0000 wakeup frame 3 byte mask 2 register [7:0] wakeup frame 3 byte mask 2 register [15:8] 0x68 to 0x6b 0x6a - 0x6b 0x6a 0x6b wf3bm3 0x0000 wakeup frame 3 byte mask 3 register [7:0] wakeup frame 3 byte mask 3 register [15:8] 0x6c - 0x6d 0x6c 0x6d 0x6c to 0x6f 0x6e - 0x6f 0x6e 0x6f reserved dont care none 0x70 - 0x71 0x70 0x71 txcr 0x0000 transmit control register [7:0] transmit control register [15:8] 0x70 to 0x73 0x72 - 0x73 0x72 0x73 txsr 0x0000 transmit status register [7:0] transmit status register [15:8] 0x74 - 0x75 0x74 0x75 rxcr1 0x0800 receive control register 1 [7:0] receive control register 1 [15:8] 0x74 to 0x77 0x76 - 0x77 0x76 0x77 rxcr2 0x0004 receive control register 2 [7:0] receive control register 2 [15:8] 0x78 - 0x79 0x78 0x79 txmir 0x0000 txq memory information register [7:0] txq memory information register [15:8] 0x78 to 0x7b 0x7a - 0x7b 0x7a 0x7b reserved dont care none 0x7c - 0x7d 0x7c 0x7d rxfhsr 0x0000 receive frame header status register [7:0] receive frame header status register [15:8] 0x7c to 0x7f 0x7e - 0x7f 0x7e 0x7f rxfhbcr 0x0000 receive frame header byte count register [7:0] receive frame header byte count register [15:8] 0x80 - 0x81 0x80 0x81 txqcr 0x0000 txq command register [7:0] txq command register [15:8] 0x80 to 0x83 0x82 - 0x83 0x82 0x83 rxqcr 0x0000 rxq command register [7:0] rxq command register [15:8] 0x84 - 0x85 0x84 0x85 txfdpr 0x0000 tx frame data pointer register [7:0] tx frame data pointer register [15:8] 0x84 to 0x87 0x86 - 0x87 0x86 0x87 rxfdpr 0x0000 rx frame data pointer register [7:0] rx frame data pointer register [15:8] 0x88 - 0x89 0x88 0x89 0x88 to 0x8b 0x8a - 0x8b 0x8a 0x8b reserved dont care none 0x8c - 0x8d 0x8c 0x8d rxdttr 0x0000 rx duration timer threshold register [7:0] rx duration timer threshold register [15:8] 0x8c to 0x8f 0x8e - 0x8f 0x8e 0x8f rxdbctr 0x0000 rx data byte count threshold register [7:0] rx data byte count threshold register [15:8] downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 46 m9999-083109-2.0 i/o register offset location 32-bit 16-bit 8-bit register name default value description 0x90 - 0x91 0x90 0x91 ier 0x0000 interrupt enable register [7:0] interrupt enable register [15:8] 0x90 to 0x93 0x92 - 0x93 0x92 0x93 isr 0x0300 interrupt status register [7:0] interrupt status register [15:8] 0x94 - 0x95 0x94 0x95 0x94 to 0x97 0x96 - 0x97 0x96 0x97 reserved dont care none 0x98 - 0x99 0x98 0x99 0x98 to 0x9b 0x9a - 0x9b 0x9a 0x9b reserved dont care none 0x9c - 0x9d 0x9c 0x9d rxfctr 0x0000 rx frame count & threshold register [7:0] rx frame count & threshold register [15:8] 0x9c to 0x9f 0x9e - 0x9f 0x9e 0x9f txntfsr 0x0000 tx next total frames size register [7:0] tx next total frames size register [15:8] 0xa0 - 0xa1 0xa0 0xa1 mahtr0 0x0000 mac address hash table register 0 [7:0] mac address hash table register 0 [15:8] 0xa0 to 0xa3 0xa2 - 0xa3 0xa2 0xa3 mahtr1 0x0000 mac address hash table register 1 [7:0] mac address hash table register 1 [15:8] 0xa4 - 0xa5 0xa4 0xa5 mahtr2 0x0000 mac address hash table register 2 [7:0] mac address hash table register 2 [15:8] 0xa4 to 0xa7 0xa6 - 0xa7 0xa6 0xa7 mahtr3 0x0000 mac address hash table register 3 [7:0] mac address hash table register 3 [15:8] 0xa8 - 0xa9 0xa8 0xa9 0xa8 to 0xab 0xaa - 0xab 0xaa 0xab reserved dont care none 0xac - 0xad 0xac 0xad 0xac to 0xaf 0xae - 0xaf 0xae 0xaf reserved dont care none 0xb0 - 0xb1 0xb0 0xb1 fclwr 0x0500 flow control low watermark register [7:0] flow control low watermark register [15:8] 0xb0 to 0xb3 0xb2 - 0xb3 0xb2 0xb3 fchwr 0x0300 flow control high watermark register [7:0] flow control high watermark register [15:8] 0xb4 - 0xb5 0xb4 0xb5 fcowr 0x0040 flow control overrun watermark register [7:0] flow control overrun watermark register [15:8] 0xb4 to 0xb7 0xb6 - 0xb7 0xb6 0xb7 reserved dont care none 0xb8 - 0xb9 0xb8 0xb9 0xb8 to 0xbb 0xba - 0xbb 0xba 0xbb reserved dont care none 0xbc - 0xbd 0xbc 0xbd 0xbc to 0xbf 0xbe - 0xbf 0xbe 0xbf reserved dont care none downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 47 m9999-083109-2.0 i/o register offset location 32-bit 16-bit 8-bit register name default value description 0xc0 - 0xc1 0xc0 0xc1 cider 0x8870 chip id and enable register [7:0] chip id and enable register [15:8] 0xc0 to 0xc3 0xc2 - 0xc3 0xc2 0xc3 reserved dont care none 0xc4 - 0xc5 0xc4 0xc5 reserved dont care none 0xc4 to 0xc7 0xc6 - 0xc7 0xc6 0xc7 cgcr 0x0835 chip global control register [7:0] chip global control register [15:8] 0xc8 - 0xc9 0xc8 0xc9 iacr 0x0000 indirect access control register [7:0] indirect access control register [15:8] 0xc8 to 0xcb 0xca - 0xcb 0xca 0xcb reserved dont care none 0xcc - 0xcd 0xcc 0xcd 0xcc to 0xcf 0xce - 0xcf 0xce 0xcf reserved dont care none 0xd0 - 0xd1 0xd0 0xd1 iadlr 0x0000 indirect access data low register [7:0] indirect access data low register [15:8] 0xd0 to 0xd3 0xd2 - 0xd3 0xd2 0xd3 iadhr 0x0000 indirect access data high register [7:0] indirect access data high register [15:8] 0xd4 - 0xd5 0xd4 0xd5 pmecr 0x0080 power management event control register [7:0] power management event control register [15:8] 0xd4 to 0xd7 0xd6 - 0xd7 0xd6 0xd7 gswutr 0x080c go-sleep & wake-up time register [7:0] go-sleep & wake-up time register [15:8] 0xd8 - 0xd9 0xd8 0xd9 phyrr 0x0000 phy reset register [7:0] phy reset register [15:8] 0xd8 to 0xdb 0xda - 0xdb 0xda 0xdb reserved dont care none 0xdc - 0xdd 0xdc 0xdd 0xdc to 0xdf 0xde - 0xdf 0xde 0xdf reserved dont care none 0xe0 - 0xe1 0xe0 0xe1 0xe0 to 0xe3 0xe2 - 0xe3 0xe2 0xe3 reserved dont care none 0xe4 - 0xe5 0xe4 0xe5 p1mbcr 0x3120 phy 1 mii-register basic control register [7:0] phy 1 mii-register basic control register [15:8] 0xe4 to 0xe7 0xe6 - 0xe7 0xe6 0xe7 p1mbsr 0x7808 phy 1 mii-register basic status register [7:0] phy 1 mii-register basic status register [15:8] 0xe8 - 0xe9 0xe8 0xe9 phy1ilr 0x1430 phy 1 phy id low register [7:0] phy 1 phy id low register [15:8] 0xe8 to 0xeb 0xea - 0xeb 0xea 0xeb phy1ihr 0x0022 phy 1 phy id high register [7:0] phy 1 phy id high register [15:8] phy 1 auto-negotiation advertisement register [7:0] 0xec - 0xed 0xec 0xed p1anar 0x05e1 phy 1 auto-negotiation advertisement register [15:8] phy 1 auto-negotiation link partner ability register [7:0] 0xec to 0xef 0xee - 0xef 0xee 0xef p1anlpr 0x0001 phy 1 auto-negotiation link partner ability register [15:8] downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 48 m9999-083109-2.0 i/o register offset location 32-bit 16-bit 8-bit register name default value description 0xf0 - 0xf1 0xf0 0xf1 0xf0 to 0xf3 0xf2 - 0xf3 0xf2 0xf3 reserved dont care none 0xf4 - 0xf5 0xf4 0xf5 p1sclmd 0x0000 port 1 phy special control/status, linkmd ? [7:0] port 1 phy special control/status, linkmd ? [15:8] 0xf4 to 0xf7 0xf6 - 0xf7 0xf6 0xf7 p1cr 0x00ff port 1 control register [7:0] port 1 control register [15:8] 0xf8 - 0xf9 0xf8 0xf9 p1sr 0x8080 port 1 status register [7:0] port 1 status register [15:8] 0xf8 to 0xfb 0xfa - 0xfb 0xfa 0xfb reserved dont care none 0xfc - 0xfd 0xfc 0xfd 0xfc to 0xff 0xfe - 0xff 0xfe 0xff reserved dont care none downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 49 m9999-083109-2.0 register map: mac, phy and qmu do not write to bit values or to registers defined as reserved. manipulating reserved bits or registers caus es unpredictable and often fatal results. if the user wants to write to these reserved bits, the user has to read back these reserved bits (ro or rw) first, then or with the read value of the reserved bits and write back to these res erved bits. bit type definition ro = read only. wo = write only. rw = read/write. w1c = write 1 to clear (writing an 1 to clear this bit). 0x00 C 0x05: reserved bus error status register (0x06 C 0x07): besr this register flags the different kinds of errors on the host bus. bit default value r/w description 15 0 ro (w1c) ibec illegal byte enable combination 1: illegal byte enable combination occurs. the illegal combination value can be found from bit 14 to bit 11. 0: legal byte enable combination. write 1 to clear this bit. 14-11 - ro ibecv illegal byte enable combination value bit 14: byte enable 3. bit 13: byte enable 2. bit 12: byte enable 1. bit 11: byte enable 0. this value is valid only when bit 15 is set to 1. 10-0 - ro reserved . chip configuration register (0x08 C 0x09): ccr this register indicates the chip configuration mode based on strapping and bonding options bit default value r/w description 15-11 - ro reserved . 10 - ro bus endian mode the eesk (pin 29) value is latched into this bit druing power-up/reset. 0: bus in big endian mode, 1: bus in little endian mode. 9 - ro eeprom presence the eeen (pin 26) value is latched into this bit druing power-up/reset. 0: no external eeprom, 1: use external eeprom. 8 0 ro reserved . 7 - ro 8-bit data bus width this bit value is loaded from either eeprom or eedi (pin 30, without eeprom). 0: not in 8-bit bus mode operation, 1: in 8-bit bus mode operation. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 50 m9999-083109-2.0 bit default value r/w description 6 - ro 16-bit data bus width this bit value is loaded from either eeprom or eedi (pin 30, without eeprom) 0: not in 16-bit bus mode operation, 1: in 16-bit bus mode operation. 5 - ro 32-bit data bus width this bit is set when uses ksz8851-32mql device. 0: not in 32-bit bus mode operation, 1: in 32-bit bus mode operation. 4 0 ro reserved . 3 - ro 128-pin chip package to indicate chip package is 128-pin. 0: no, 1: yes. 2 0 ro reserved . 1 0 ro reserved . 0 0 ro reserved . 0x0a C 0x0f: reserved host mac address registers: marl, marm and marh these host mac address registers are loaded starting at word location 0x1 of the eeprom upon har dware reset. the software driver can read or write these registers value, but it will not modify the original host mac address value in the eeprom. these six bytes of host mac address in external eeprom are loaded to these three registers as mapping below: marl[15:0] = eeprom 0x1(mac byte 2 and 1) marm[15:0] = eeprom 0x2(mac byte 4 and 3) marh[15:0] = eeprom 0x3(mac byte 6 and 5) the host mac address is used to define the individual destination address that the ksz8851m responds to when receiving frames. network addresses are generally expressed in the form of 01:23:45:67:89:ab, where the bytes are received from left to right, and the bits within each byte are received from right to left (lsb to msb). f or example, the actual transmitted and received bits are on the order of 10000000 11000100 10100010 11100110 10010001 11010101. these three registers value for host mac address 01:23:45:67:89:ab will be held as below: marl[15:0] = 0x89ab marm[15:0] = 0x4567 marh[15:0] = 0x0123 host mac address register low (0x10 C 0x11): marl the following table shows the register bit fields for low word of host mac address. bit default value r/w description 15-0 - rw marl mac address low the least significant word of the mac address. host mac address register middle (0x12 C 0x13): marm the following table shows the register bit fields for middle word of host mac address. bit default value r/w description 15-0 - rw marm mac address middle the middle word of the mac address. host mac address register high (0x14 C 0x15): marh the following table shows the register bit fields for high word of host mac address. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 51 m9999-083109-2.0 bit default value r/w description 15-0 - rw marh mac address high the most significant word of the mac address. 0x16 C 0x1f: reserved on-chip bus control register (0x20 C 0x21): obcr this register controls the on-chip bus clock speed for the ksz8851m. the default of the on-chip bus clock speed is 125mhz. when the external host cpu is running at a higher clock rate, the on-chip bus should be adjusted for the best performance. bit default value r/w description 15-7 - rw reserved . 6 0 rw output pin drive strength bi-directional or output pad drive strength selection. 0: 8 ma 1: 16 ma 5-3 - rw reserved . 2 0 rw on-chip bus clock selection 0: 125mhz (default setting is divided by 1, bit[1:0]=00) 1: na (reserved) 1-0 0x0 rw on-chip bus clock divider selection 00: divided by 1. 01: divided by 2. 10: divided by 3. 11: na (reserved). for example to contol the bus clock speed as below: if bit 2 = 0 and this value is set 00 to select 125mhz. if bit 2 = 0 and this value is set 01 to select 62.5mhz. eeprom control register (0x22 C 0x23): eepcr to support an external eeprom, tie the eeprom enable (eeen) pin to high; otherwise, tie it to low. if an external eeprom is not used, the software programs the host mac address. if an eeprom is used in the design (eeprom enable pin to high), the chip host mac address is loaded from the eeprom immediately after reset. the ksz8851m allows the software to access (read and write) the eeprom directly; that is, the eeprom acc ess timing can be fully controlled by the software if the eeprom software access bit is set. bit default value r/w description 15-5 - ro reserved . 4 0 rw eesa eeprom software access 1: enable software to access eeprom through bit 3 to bit 0. 0: disable software to access eeprom. 3 - ro eesb eeprom status bit data receive from eeprom. this bit directly reads the eedi pin. 2-0 0x0 rw eecb eeprom control bits bit 2: data transmit to eeprom. this bit directly controls the devices eedo pin. bit 1: serial clock. this bit directly controls the devices eesk pin. bit 0: chip select for eeprom. this bit directly controls the devices eecs pin. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 52 m9999-083109-2.0 memory bist info register (0x24 C 0x25): mbir this register indicates the build-in self test result for both tx and rx memories after power- up/reset. bit default value r/w description 15-13 0x0 ro reserved . 12 - ro txmbf tx memory bist test finish when set, it indicates the memory built in self test completion for the tx memory. 11 - ro txmbfa tx memory bist test fail when set, it indicates the tx memory built in self test has failed. 10-8 - ro txmbfc tx memory bist test fail count to indicate the tx memory built in self test failed count 7-5 - ro reserved . 4 - ro rxmbf rx memory bist finish when set, it indicates the memory built in self test completion for the rx memory. 3 - ro rxmbfa rx memory bist fail when set, it indicates the rx memory built in self test has failed. 2-0 - ro rxmbfc rx memory bist test fail count to indicate the rx memory built in self test failed count. global reset register (0x26 C 0x27): grr this register controls the global and qmu reset functions with information programmed by the cpu. bit default value r/w description 15-2 0x0000 ro reserved . 1 0 rw qmu module soft reset 1: software reset is active to clear both txq and rxq memories. 0: software reset is inactive. qmu software reset will flush out all tx/rx packet data inside the txq and rxq memories and reset all qmu registers to default value. 0 0 rw global soft reset 1: software reset is active. 0: software reset is inactive. global software reset will affect phy, mac, qmu, dma, and the switch core, all registers value are set to default value. 0x28 C 0x29: reserved wakeup frame control register (0x2a C 0x2b): wfcr this register holds control information programmed by the cpu to control the wake up frame function. bit default value r/w description 15-8 0x00 ro reserved . 7 0 rw mprxe magic packet rx enable when set, it enables the magic packet pattern detection. when reset, the magic packet pattern detection is disabled. 6-4 0x0 ro reserved . 3 0 rw wf3e wake up frame 3 enable when set, it enables the wake up frame 3 pattern detection. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 53 m9999-083109-2.0 bit default value r/w description when reset, the wake up frame 3 pattern detection is disabled. 2 0 rw wf2e wake up frame 2 enable when set, it enables the wake up frame 2 pattern detection. when reset, the wake up frame 2 pattern detection is disabled. 1 0 rw wf1e wake up frame 1 enable when set, it enables the wake up frame 1 pattern detection. when reset, the wake up frame 1 pattern detection is disabled. 0 0 rw wf0e wake up frame 0 enable when set, it enables the wake up frame 0 pattern detection. when reset, the wake up frame 0 pattern detection is disabled. 0x2c C 0x2f: reserved wakeup frame 0 crc0 register (0x30 C 0x31): wf0crc0 this register contains the expected crc values of the wake up frame 0 pattern. the value of the crc calculated is based on the ieee 802.3 ether net standard; it is taken over the bytes specified in the wake up byte mask registers. bit default value r/w description 15-0 0x0000 rw wf0crc0 wake up frame 0 crc (lower 16 bits) the expected crc value of a wake up frame 0 pattern. wakeup frame 0 crc1 register (0x32 C 0x33): wf0crc1 this register contains the expected crc values of the wake up frame 0 pattern. the value of the crc calculated is based on the ieee 802.3 ether net standard; it is taken over the bytes specified in the wake up byte mask registers. bit default value r/w description 15-0 0x0000 rw wf0crc1 wake up frame 0 crc (upper 16 bits). the expected crc value of a wake up frame 0 pattern. wakeup frame 0 byte mask 0 register (0x34 C 0x35): wf0bm0 this register contains the first 16 bytes mask values of the wake up frame 0 pattern. setting bit 0 selects the first byte of the wake up frame 0, setting bit 15 selects the 16th byte of the wake up frame 0. bit default value r/w description 15-0 0x0000 rw wf0bm0 wake up frame 0 byte mask 0 the first 16 bytes mask of a wake up frame 0 pattern. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 54 m9999-083109-2.0 wakeup frame 0 byte mask 1 register (0x36 C 0x37): wf0bm1 this register contains the next 16 bytes mask values of the wake up frame 0 pattern. setting bit 0 selects the 17th byte of the wake up frame 0. setting bit 15 selects the 32nd byte of the wake up frame 0. bit default value r/w description 15-0 0x0000 rw wf0bm1 wake up frame 0 byte mask 1. the next 16 bytes mask covering bytes 17 to 32 of a wake up frame 0 pattern. wakeup frame 0 byte mask 2 register (0x38 C 0x39): wf0bm2 this register contains the next 16 bytes mask values of the wake up frame 0 pattern. setting bit 0 selects t he 33rd byte of the wake up frame 0. setting bit 15 selects the 48th byte of the wake up frame 0. bit default value r/w description 15-0 0x0000 rw wf0bm2 wake-up frame 0 byte mask 2. the next 16 bytes mask covering bytes 33 to 48 of a wake-up frame 0 pattern. wakeup frame 0 byte mask 3 register (0x3a C 0x3b): wf0bm3 this register contains the last 16 bytes mask values of the wake up frame 0 pattern. setting bit 0 selects the 49th b yte of the wake up frame 0. setting bit 15 selects the 64th byte of the wake up frame 0. bit default value r/w description 15-0 0x0000 rw wf0bm3 wake-up frame 0 byte mask 3. the last 16 bytes mask covering bytes 49 to 64 of a wake-up frame 0 pattern. 0x3c C 0x3f: reserved wakeup frame 1 crc0 register (0x40 C 0x41): wf1crc0 this register contains the expected crc values of the wake up frame 1 pattern. the value of the crc calculated is based on the ieee 802.3 ether net standard; it is taken over the bytes specified in the wake up byte mask registers. bit default value r/w description 15-0 0x0000 rw wf1crc0 wake-up frame 1 crc (lower 16 bits). the expected crc value of a wake-up frame 1 pattern. wakeup frame 1 crc1 register (0x42 C 0x43): wf1crc1 this register contains the expected crc values of the wake up frame 1 pattern. the value of the crc calculated is based on the ieee 802.3 ether net standard, it is taken over the bytes specified in the wake up byte mask registers. bit default value r/w description 15-0 0x0000 rw wf1crc1 wake-up frame 1 crc (upper 16 bits). the expected crc value of a wake-up frame 1 pattern. wakeup frame 1 byte mask 0 register (0x44 C 0x45): wf1bm0 this register contains the first 16 bytes mask values of the wake up frame 1 pattern. setting bit 0 selects the first byte of the wake up frame 1, setting bit 15 selects the 16th byte of the wake up frame 1. bit default value r/w description 15-0 0x0000 rw wf1bm0 wake-up frame 1 byte mask 0. the first 16 bytes mask of a wake-up frame 1 pattern. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 55 m9999-083109-2.0 wakeup frame 1 byte mask 1 register (0x46 C 0x47): wf1bm1 this register contains the next 16 bytes mask values of the wake up frame 1 pattern. setting bit 0 selects the 17th byte of the wake up frame 1. setting bit 15 selects the 32nd byte of the wake up frame 1. bit default value r/w description 15-0 0x0000 rw wf1bm1 wake-up frame 1 byte mask 1. the next 16 bytes mask covering bytes 17 to 32 of a wake-up frame 1 pattern. wakeup frame 1 byte mask 2 register (0x48 C 0x49): wf1bm2 this register contains the next 16 bytes mask values of the wake up frame 1 pattern. setting bit 0 selects t he 33rd byte of the wake up frame 1. setting bit 15 selects the 48th byte of the wake up frame 1. bit default value r/w description 15-0 0x0000 rw wf1bm2 wake-up frame 1 byte mask 2. the next 16 bytes mask covering bytes 33 to 48 of a wake-up frame 1 pattern. wakeup frame 1 byte mask 3 register (0x4a C 0x4b): wf1bm3 this register contains the last 16 bytes mask values of the wake up frame 1 pattern. setting bit 0 selects the 49th b yte of the wake up frame 1. setting bit 15 selects the 64th byte of the wake up frame 1. bit default value r/w description 15-0 0x0000 rw wf1bm3 wake-up frame 1 byte mask 3. the last 16 bytes mask covering bytes 49 to 64 of a wake-up frame 1 pattern. 0x4c C 0x4f: reserved wakeup frame 2 crc0 register (0x50 C 0x51): wf2crc0 this register contains the expected crc values of the wake up frame 2 pattern. the value of the crc calculated is based on the ieee 802.3 ether net standard, it is taken over the bytes specified in the wake up byte mask registers. bit default value r/w description 15-0 0x0000 rw wf2crc0 wake-up frame 2 crc (lower 16 bits). the expected crc value of a wake-up frame 2 pattern. wakeup frame 2 crc1 register (0x52 C 0x53): wf2crc1 this register contains the expected crc values of the wake-up frame 2 pattern. the value of the crc calculated is based on the ieee 802.3 ether net standard, it is taken over the bytes specified in the wake up byte mask registers. bit default value r/w description 15-0 0x0000 rw wf2crc1 wake-up frame 2 crc (upper 16 bits). the expected crc value of a wake-up frame 2 pattern. wakeup frame 2 byte mask 0 register (0x54 C 0x55): wf2bm0 this register contains the first 16 bytes mask values of the wake up frame 2 pattern. setting bit 0 selects the first byte of the wake up frame 2, setting bit 15 selects the 16th byte of the wake up frame 2. bit default value r/w description 15-0 0x0000 rw wf2bm0 wake-up frame 2 byte mask 0. the first 16 bytes mask of a wake-up frame 2 pattern. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 56 m9999-083109-2.0 wakeup frame 2 byte mask 1 register (0x56 C 0x57): wf2bm1 this register contains the next 16 bytes mask values of the wake up frame 2 pattern. setting bit 0 selects the 17th byte of the wake up frame 2. setting bit 15 selects the 32nd byte of the wake up frame 2. bit default value r/w description 15-0 0x0000 rw wf2bm1 wake-up frame 2 byte mask 1. the next 16 bytes mask covering bytes 17 to 32 of a wake-up frame 2 pattern. wakeup frame 2 byte mask 2 register (0x58 C 0x59): wf2bm2 this register contains the next 16 bytes mask values of the wake up frame 2 pattern. setting bit 0 selects t he 33rd byte of the wake up frame 2. setting bit 15 selects the 48th byte of the wake up frame 2. bit default value r/w description 15-0 0 rw wf2bm2 wake-up frame 2 byte mask 2. the next 16 bytes mask covering bytes 33 to 48 of a wake-up frame 2 pattern. wakeup frame 2 byte mask 3 register (0x5a C 0x5b): wf2bm3 this register contains the last 16 bytes mask values of the wake up frame 2 pattern. setting bit 0 selects the 49th b yte of the wake up frame 2. setting bit 15 selects the 64th byte of the wake up frame 2. bit default value r/w description 15-0 0 rw wf2bm3 wake-up frame 2 byte mask 3. the last 16 bytes mask covering bytes 49 to 64 of a wake-up frame 2 pattern. 0x5c C 0x5f: reserved wakeup frame 3 crc0 register (0x60 C 0x61): wf3crc0 this register contains the expected crc values of the wake up frame 3 pattern. the value of the crc calculated is based on the ieee 802.3 ethernet standard, it is taken over the bytes specified in the wake-up byte mask register s. bit default value r/w description 15-0 0 rw wf3crc0 wake-up frame 3 crc (lower 16 bits). the expected crc value of a wake up frame 3 pattern. wakeup frame 3 crc1 register (0x62 C 0x63): wf3crc1 this register contains the expected crc values of the wake up frame 3 pattern. the value of the crc calculated is based on the ieee 802.3 ethernet standard, it is taken over the bytes specified in the wake-up byte mask register s. bit default value r/w description 15-0 0 rw wf3crc1 wake-up frame 3 crc (upper 16 bits). the expected crc value of a wake up frame 3 pattern. wakeup frame 3 byte mask 0 register (0x64 C 0x65): wf3bm0 this register contains the first 16 bytes mask values of the wake up frame 3 pattern. setting bit 0 selects the first byte of the wake up frame 3, setting bit 15 selects the 16th byte of the wake up frame 3. bit default value r/w description 15-0 0 rw wf3bm0 wake up frame 3 byte mask 0. the first 16 byte mask of a wake up frame 3 pattern. wakeup frame 3 byte mask 1 register (0x66 C 0x67): wf3bm1 this register contains the next 16 bytes mask values of the wake up frame 3 pattern. setting bit 0 selects the 17th byte of the wake up frame 3. setting bit 15 selects the 32nd byte of the wake up frame 3. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 57 m9999-083109-2.0 bit default value r/w description 15-0 0 rw wf3bm1 wake up frame 3 byte mask 1. the next 16 bytes mask covering bytes 17 to 32 of a wake up frame 3 pattern. wakeup frame 3 byte mask 2 register (0x68 C 0x69): wf3bm2 this register contains the next 16 bytes mask values of the wake up frame 3 pattern. setting bit 0 selects t he 33rd byte of the wake up frame 3. setting bit 15 selects the 48th byte of the wake up frame 3. bit default value r/w description 15-0 0 rw wf3bm2 wake up frame 3 byte mask 2. the next 16 bytes mask covering bytes 33 to 48 of a wake up frame 3 pattern. wakeup frame 3 byte mask 3 register (0x6a C 0x6b): wf3bm3 this register contains the last 16 bytes mask values of the wake up frame 3 pattern. setting bit 0 selects the 49th b yte of the wake up frame 3. setting bit 15 selects the 64th byte of the wake up frame 3. bit default value r/w description 15-0 0 rw wf3bm3 wake up frame 3 byte mask 3. the last 16 bytes mask covering bytes 49 to 64 of a wake up frame 3 pattern. 0x6c C 0x6f: reserved transmit control register (0x70 C 0x71): txcr this register holds control information programmed by the cpu to control the qmu transmit module functi on. bit default value r/w description 15-9 - ro reserved . 8 0x0 rw tcgicmp transmit checksum generation for icmp when this bit is set, the ksz8851m is enabled to transmit icmp frame (only for non- fragment frame) checksum generation. 7 0x0 ro reserved . 6 0x0 rw tcgtcp transmit checksum generation for tcp when this bit is set, the ksz8851m is enabled to transmit tcp frame checksum generation. 5 0x0 rw tcgip transmit checksum generation for ip when this bit is set, the ksz8851m is enabled to transmit ip header checksum generation. 4 0x0 rw ftxq flush transmit queue when this bit is set, the transmit queue memory is cleared and tx frame pointer is reset. note: disable the txe transmit enable bit[0] first before set this bit, then clear this bit to normal operation. 3 0x0 rw txfce transmit flow control enable when this bit is set and the ksz8851m is in full-duplex mode, flow control is enabled. the ksz8851m transmits a pause frame when the receive buffer capacity reaches a threshold level that will cause the buffer to overflow. when this bit is set and the ksz8851m is in half-duplex mode, back-pressure flow control is enabled. when this bit is cleared, no transmit flow control is enabled. 2 0x0 rw txpe transmit padding enable when this bit is set, the ksz8851m automatically adds a padding field to a packet shorter than 64 bytes. note: setting this bit requires enabling the add crc feature (bit1=1) to avoid crc errors for the transmit packet. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 58 m9999-083109-2.0 bit default value r/w description 1 0x0 rw txce transmit crc enable when this bit is set, the ksz8851m automatic ally adds a 32-bit crc checksum field to the end of a transmit frame. 0 0x0 rw txe transmit enable when this bit is set, the transmit module is enabled and placed in a running state. when reset, the transmit process is placed in the stopped state after the transmission of the current frame is completed. transmit status register (0x72 C 0x73): txsr this register keeps the status of the last transmitted frame. bit default value r/w description 15-14 0x0 ro reserved . 13 0x0 ro txlc transmit late collision this bit is set when a transmit late collision occurs. 12 0x0 ro txmc transmit maximum collision this bit is set when a transmit maximum collision is reached. 11-6 - ro reserved . 5-0 - ro txfid transmit frame id this field identifies the transmitted frame. all of the transmit status information in this register belongs to the frame with this id. receive control register 1 (0x74 C 0x75): rxcr1 this register holds control information programmed by the cpu to control the receive function. bit default value r/w description 15 0x0 rw frxq flush receive queue when this bit is set, the receive queue memory is cleared and rx frame pointer is reset. note: disable the rxe receive enable bit[0] first before set this bit, then clear this bit to normal operation. 14 0x0 rw rxudpfcc receive udp frame checksum check enable when this bit is set, the ksz8851 will check for correct udp checksum for incoming udp frames. any received udp frames with incorrect checksum will be discarded. 13 0x0 rw rxtcpfcc receive tcp frame checksum check enable when this bit is set, the ksz8851 will check for correct tcp checksum for incoming tcp frames. any received tcp frames with incorrect checksum will be discarded. 12 0x0 rw rxipfcc receive ip frame checksum check enable when this bit is set, the ksz8851 will check for correct ip header checksum for incoming ip frames. any received ip header with incorrect checksum will be discarded. 11 0x1 rw rxpafma receive physical address filtering with mac address enable when this bit is set, this bit enables the rx function to receive physical address that pass the mac address filtering mechanism (see address filtering scheme in table 3 for detail). 10 0x0 rw rxfce receive flow control enable when this bit is set and the ksz8851m is in full-duplex mode, flow control is enabled, and the ksz8851m will acknowledge a pause frame from the receive interface; i.e., the outgoing packets are pending in the transmit buffer until the pause frame control timer expires. this field has no meaning in half-duplex mode and should be programmed to 0. when this bit is cleared, flow control is not enabled. 9 0x0 rw rxefe receive error frame enable when this bit is set, crc error frames are allowed to be received into the rx q ueue. when this bit is cleared, all crc error frames are discarded. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 59 m9999-083109-2.0 bit default value r/w description 8 0x0 rw rxmafma receive multicast address filtering with mac address enable when this bit is set, this bit enables the rx function to receive multicast address that pass the mac address filtering mechanism (see address filtering scheme in table 3 for detail). 7 0x0 rw rxbe receive broadcast enable when this bit is set, the rx module receives all the broadcast frames. 6 0x0 rw rxme receive multicast enable when this bit is set, the rx module receives all the multicast frames (including broadcast frames). 5 0x0 rw rxue receive unicast enable when this bit is set, the rx module receives unicast frames that match the 48-bit station mac address of the module. 4 0x0 rw rxae receive all enable when this bit is set, the ksz8851m receives all incoming frames, regardless of the frames destination address (see address filtering scheme in table 3 for detail). 3-2 0x0 rw reserved 1 0x0 rw rxinvf receive inverse filtering when this bit is set, the ksz8851m receives function with address check operation in inverse filtering mode (see address filtering scheme in table 3 for detail). 0 0x0 rw rxe receive enable when this bit is set, the rx block is enabled and placed in a running state. when this bit is cleared, the receive process is placed in the stopped state upon completing reception of the current frame. receive control register 2 (0x76 C 0x77): rxcr2 this register holds control information programmed by the cpu to control the receive function. bit default value r/w description 15-5 - ro reserved . 4 0x0 rw iuffp ipv4/ipv6/udp fragment frame pass when this bit is set, the ksz8851m will pass the checksum check at receive side for ipv4/ipv6 udp frame with fragment extension header. when this bit is cleared, the ksz8851m will perform checksum operation based on configuration and doesnt care whether its a fragment frame or not. 3 0x0 rw rxiufcez receive ipv4/ipv6/udp frame checksum equal zero when this bit is set, the ksz8851m will pass the filtering for ipv4/ipv6 udp frame with udp checksum equal to zero. when this bit is cleared, the ksz8851m will drop ipv4/ipv6 udp packet with udp checksum equal to zero. 2 0x1 rw udplfe udp lite frame enable when this bit is set, the ksz8851m will check the checksum at receive side and generate the checksum at transmit side for udp lite frame. when this bit is cleared, the ksz8851m will pass the checksum check at receive side and skip the checksum generation at transmit side for udp lite frame. 1 0x0 rw rxicmpfcc receive icmp frame checksum check enable when this bit is set, the ksz8851 will check for correct icmp checksum for incoming icmp frames (only for non-fragment frame) . any received icmp frames with incorrect checksum will be discarded. 0 0x0 rw rxsaf receive source address filtering when this bit is set, the ksz8851m will drop the frame if the source address is same as mac address in marl, marm, marh registers. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 60 m9999-083109-2.0 txq memory information register (0x78 C 0x79): txmir this register indicates the amount of free memory available in the txq of the qmu module. bit default value r/w description 15-13 - ro reserved . 12-0 - ro txma transmit memory available the amount of memory available is represented in units of byte. the txq memory is used for both frame payload, control word. note: software must be written to ensure that there is enough memory for the next transmit frame including control information before transmit data is written to the txq. 0x7a C 0x7b: reserved receive frame header status register (0x7c C 0x7d): rxfhsr this register indicates the received frame header status information, the received frames are reported in rxfctr register. this register contains the status information for the frame received and the cpu can read so m any times same as the frame count value in the rxfctr. bit default value r/w description 15 - ro rxfv receive frame valid when this bit is set, it indicates that the present frame in the receive packet memory is valid. the status information currently in this location is also valid. when clear, it indicates that there is either no pending receive frame or that the current frame is still in the process of receiving. 14 - ro reserved 13 - ro rxicmpfcs receive icmp frame checksum status when this bit is set, the ksz8851 received icmp frame checksum field is incorrect. 12 - ro rxipfcs receive ip frame checksum status when this bit is set, the ksz8851 received ip header checksum field is incorrect. 11 - ro rxtcpfcs receive tcp frame checksum status when this bit is set, the ksz8851 received tcp frame checksum field is incorrect. 10 - ro rxudpfcs receive udp frame checksum status when this bit is set, the ksz8851 received udp frame checksum field is incorrect. 9-8 - ro reserved 7 - ro rxbf receive broadcast frame when this bit is set, it indicates that this frame has a broadcast address. 6 - ro rxmf receive multicast frame when this bit is set, it indicates that this frame has a multicast address (including the broadcast address). 5 - ro rxuf receive unicast frame when this bit is set, it indicates that this frame has a unicast address. 4 - ro rxmr receive mii error when set, it indicates that there is an mii symbol error on the received frame. 3 - ro rxft receive frame type when this bit is set, it indicates that the frame is an ethernet-type frame (frame length is greater than 1500 bytes). when clear, it indicates that the frame is an ieee 802.3 frame. this bit is not valid for runt frames. 2 - ro rxftl receive frame too long when this bit is set, it indicates that the frame length exceeds the maximum size of 2000 bytes. frames that are too long are passed to the host only if the pass bad frame bit is set. note: frame too long is only a frame length indication and does not cause any frame truncation. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 61 m9999-083109-2.0 bit default value r/w description 1 - ro rxrf receive runt frame when this bit is set, it indicates that a frame was damaged by a collision or had a premature termination before the collision window passed. runt frames are passed to the host only if the pass bad frame bit is set. 0 - ro rxce receive crc error when this bit is set, it indicates that a crc error has occurred on the curren t received frame. crc error frames are passed to the host only if the pass bad frame bit is set. receive frame header byte count register (0x7e C 0x7f): rxfhbcr this register indicates the received frame header byte count information, the received frames are r eported in rxfctr register. this register contains the total number of bytes information for the frame received and the cpu can read so many times same as the frame count value in the rxfctr. bit default value r/w description 15-12 - ro reserved . 11-0 - ro rxbc receive byte count this field indicates the present received frame byte size. txq command register (0x80 C 0x81): txqcr this register is programmed by the host cpu to issue a transmit command to the txq. the present transmit frame in the txq memory is queued for transmit. bit default value r/w description 15-3 - rw reserved 2 0x0 rw aetfe auto-enqueue txq frame enable when this bit is written as 1, the ksz8851m will enable current all tx frames prepared in the tx buffer are queued to transmit automatically. the bit 0 metfe has to be set 0 when this bit is set to 1 in this register. 1 0x0 rw txqmam txq memory available monitor when this bit is written as 1, the ksz8851m will generate interrupt (bit 6 in isr register) to cpu when txq memory is available based upon the total amount of txq space requested by cpu at txntfsr (0x9e) register. note: this bit is self-clearing after the frame is finished transmitting. the software should wait for the bit to be cleared before set to 1 again. 0 0x0 rw metfe manual enqueue txq frame enable when this bit is written as 1, the ksz8851m will enable current tx frame prepared in the tx buffer is queued for transmit, this is only transmit one frame at a time. note: this bit is self-clearing after the frame is finished transmitting. the software should wait for the bit to be cleared before setting up another new tx frame. rxq command register (0x82 C 0x83): rxqcr this register is programmed by the host cpu to issue dma read or write command to the rxq and txq. this register also is used to control all rx thresholds enable and status. bit default value r/w description 15-13 - rw reserved . 12 - ro rxdtts rx duration timer threshold status when this bit is set, it indicates that rx interrupt is due to the time start at first received frame in rxq buffer exceeds the threshold set in rx duration timer threshold register (0x8c, rxdtt). this bit will be updated when write 1 to bit 13 in isr register. 11 - ro rxdbcts rx data byte count threshold status when this bit is set, it indicates that rx interrupt is due to the number of received bytes in rxq buffer exceeds the threshold set in rx da ta byte count threshold register (0x8e, downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 62 m9999-083109-2.0 rxdbct). this bit will be updated when write 1 to bit 13 in isr register. 10 - ro rxfcts rx frame count threshold status when this bit is set, it indicates that rx interrupt is due to the number of received frames in rxq buffer exceeds the threshold set in rx frame count threshold register (0x9c, rxfct). this bit will be updated when write 1 to bit 13 in isr register. 9 0x0 rw rxiphtoe rx ip header two-byte offset enable when this bit is written as 1, the ksz8851m will enable to add two bytes before frame header in order for ip header inside the frame contents to be aligned with double word boundary to speed up software operation. 8 - rw reserved . 7 0x0 rw rxdtte rx duration timer threshold enable when this bit is written as 1, the ksz8851m will enable rx interrupt (bit 13 in isr) when the time start at first received frame in rxq buffer exceeds the threshold set in rx duration timer threshold register (0x8c, rxdtt). 6 0x0 rw rxdbcte rx data byte count threshold enable when this bit is written as 1, the ksz8851m will enable rx interrupt (bit 13 in isr) when the number of received bytes in rxq buffer exceeds the threshold set in rx data byte count threshold register (0x8e, rxdbct). 5 0x0 rw rxfcte rx frame count threshold enable when this bit is written as 1, the ksz8851m will enable rx interrupt (bit 13 in isr) when the number of received frames in rxq buffer exceeds the threshold set in rx frame count threshold register (0x9c, rxfct). 4 0x0 rw adrfe auto-dequeue rxq frame enable when this bit is written as 1, the ksz8851m will automatically enable rxq frame buffer dequeue. the read pointer in rxq frame buffer will be automatically adjusted to next received frame location after current frame is completely read by the host. 3 0x0 wo sda start dma access when this bit is written as 1, the ksz8851m allows a dma operation from the host cpu to access either read rxq frame buffer or write txq frame buffer with aen, rdn or wrn signals regardless of the address and byte enable signals. all registers access are disabled except this register during this dma operation. this bit must be set to 0 when dma operation is finished in order to access the rest of registers. 2-1 - rw reserved. 0 0x0 rw rrxef release rx error frame when this bit is written as 1, the current rx error frame buffer is released. note: this bit is self-clearing after the fr ame memory is released. the software should wait for the bit to be cleared before processing new rx frame. tx frame data pointer register (0x84 C 0x85): txfdpr the value of this register determines the address to be accessed within the txq frame buffer. when the auto incr ement is set, it will automatically increment the pointer value on write accesses to the data register. the counter is incremented by one for every byte access, by two for every word access, and by four for every double word access. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 63 m9999-083109-2.0 bit default value r/w description 15 - ro reserved . 14 0x0 rw txfpai tx frame data pointer auto increment when this bit is set, the tx frame data pointer register increments automatically on accesses to the data register. the increment is by one for every byte access, by two for every word access, and by four for every doubleword access. when this bit is reset, the tx frame data pointer is manually controlled by user to access the tx frame location. 13-11 - ro reserved . 10-0 0x000 ro txfp tx frame pointer tx frame pointer index to the frame data register for access. this field reset to next available tx frame location when the tx frame data has been enqueued through the txq command register. rx frame data pointer register (0x86 C 0x87): rxfdpr the value of this register determines the address to be accessed within the rxq frame buffer. when the auto increment is set, it will automatically increment the rxq pointer on read accesses to the data register. the counter is incremented is by one for every byte access, by two for every word access, and by four f or every double word access. bit default value r/w description 15 - ro reserved . 14 0x0 rw rxfpai rx frame pointer auto increment when this bit is set, the rxq address register increments automatically on accesses to the data register. the increment is by one for every byte access, by two for every word access, and by four for every double word access. when this bit is reset, the rx frame data pointer is manually controlled by user to access the rx frame location. 13 - ro reserved . 12 0x0 rw wst write sample time this bit is used to select the wrn active to write data valid time as shown in figure 12. 0: wrn active to write data valid sample time is range of 8ns(min) to 16ns(max). 1: wrn active to write data valid sample time is 4ns(max). 11 0x0 wo (read back is 0) ems endian mode selection this bit is used to select either big or little endian mode when endian mode select strapping pin (29) is nc or tied to gnd. 0: is set to little endian mode 1: is set to big endian mode 10-0 0x000 wo rxfp rx frame pointer rx frame data pointer index to the data register for access. this pointer value must reset to 0x000 before each dma operation from the host cpu to read rxq frame buffer. 0x88 C 0x8b: reserved rx duration timer threshold register (0x8c C 0x8d): rxdttr this register is used to program the received frame duration timer threshold. bit default value r/w description 15-0 0x0000 rw rxdtt receive duration timer threshold downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 64 m9999-083109-2.0 to program received frame duration timer threshold value in 1us interval. the maximum value is 0xcfff. when bit 7 set to 1 in rxqcr register, the ksz8851m will set rx interrupt (bit 13 in isr) after the time starts at first received frame in rxq buffer and exceeds the threshold set in this register. rx data byte count threshold register (0x8e C 0x8f): rxdbctr this register is used to program the received data byte count threshold. bit default value r/w description 15-0 0x0000 rw rxdbct receive data byte count threshold to program received data byte threshold value in byte count. when bit 6 set to 1 in rxqcr register, the ksz8851m will set rx interrupt (bit 13 in isr) when the number of received bytes in rxq buffer exceeds the threshold set in this register. interrupt enable register (0x90 C 0x91): ier this register enables the interrupts from the qmu and other sources. bit default value r/w description 15 0x0 rw lcie link change interrupt enable when this bit is set, the link change interrupt is enabled. when this bit is reset, the link change interrupt is disabled. 14 0x0 rw txie transmit interrupt enable when this bit is set, the transmit interrupt is enabled. when this bit is reset, the transmit interrupt is disabled. 13 0x0 rw rxie receive interrupt enable when this bit is set, the receive interrupt is enabled. when this bit is reset, the receive interrupt is disabled. 12 0x0 rw reserved 11 0x0 rw rxoie receive overrun interrupt enable when this bit is set, the receive overrun interrupt is enabled. when this bit is reset, the receive overrun interrupt is disabled. 10 0x0 rw reserved 9 0x0 rw txpsie transmit process stopped interrupt enable when this bit is set, the transmit process stopped interrupt is enabled. when this bit is reset, the transmit process stopped interrupt is disabled. 8 0x0 rw rxpsie receive process stopped interrupt enable when this bit is set, the receive process stopped interrupt is enabled. when this bit is reset, the receive process stopped interrupt is disabled. 7 0x0 rw reserved 6 0x0 rw txsaie transmit space available interrupt enable when this bit is set, the transmit memory space available interrupt is enabled. when this bit is reset, the transmit memory space available interrupt is disabled. 5 0x0 rw rxwfdie receive wake-up frame detect interrupt enable when this bit is set, the receive wakeup frame detect interrupt is enabled. when this bit is reset, the receive wakeup frame detect interrupt is disabled. 4 0x0 rw rxmpdie receive magic packet detect interrupt enable when this bit is set, the receive magic packet detect interrupt is enabled. when this bit is reset, the receive magic packet detect interrupt is disabled. 3 0x0 rw ldie linkup detect interrupt enable when this bit is set, the wake-up from linkup detect interrupt is enabled. when this bit is reset, the linkup detect interrupt is disabled. 2 0x0 rw edie energy detect interrupt enable downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 65 m9999-083109-2.0 bit default value r/w description when this bit is set, the wake-up from energy detect interrupt is enabled. when this bit is reset, the energy detect interrupt is disabled. 1 0x0 ro reserved 0 0x0 rw dedie delay energy detect interrupt enable when this bit is set, the delay energy detect interrupt is enabled. when this bit is reset, the delay energy detect interrupt is disabled. note: the delay energy detect interrupt till device is ready for host access. interrupt status register (0x92 C 0x93): isr this register contains the status bits for all qmu and other interrupt sources. when the corresponding enable bit is set, it causes the interrupt pin to be asserted. this register is usually read by the host cpu and device drivers during interrupt serv ice routine or polling. the register bits are not cleared when read. the user has to write 1 to clear. bit default value r/w description 15 0x0 ro (w1c) lcis link change interrupt status when this bit is set, it indicates that the link status has changed from link up to link down, or link down to link up. this edge-triggered interrupt status is cleared by writing 1 to this bit. 14 0x0 ro (w1c) txis transmit interrupt status when this bit is set, it indicates that the txq mac has transmitted at least a frame on the mac interface and the qmu txq is ready for new frames from the host. this edge-triggered interrupt status is cleared by writing 1 to this bit. 13 0x0 ro (w1c) rxis receive interrupt status when this bit is set, it indicates that the qmu rxq has received at least a frame from the mac interface and the frame is ready for the host cpu to process. this edge-triggered interrupt status is cleared by writing 1 to this bit. 12 0x0 ro reserved 11 0x0 ro (w1c) rxois receive overrun interrupt status when this bit is set, it indicates that the receive overrun status has occurred. this edge-triggered interrupt status is cleared by writing 1 to this bit. 10 0x0 ro reserved 9 0x1 ro (w1c) txpsis transmit process stopped interrupt status when this bit is set, it indicates that the transmit process has stopped. this edge-triggered interrupt status is cleared by writing 1 to this bit. 8 0x1 ro (w1c) rxpsis receive process stopped interrupt status when this bit is set, it indicates that the receive process has stopped. this edge-triggered interrupt status is cleared by writing 1 to this bit. 7 0x0 ro reserved 6 0x0 ro (w1c) txsais transmit space available interrupt status when this bit is set, it indicates that transmit memory space available status has occurred. when this bit is reset, the transmit memory space available interrupt is disabled. 5 0x0 ro rxwfdis receive wakeup frame detect interrupt status when this bit is set, it indicates that receive wakeup frame detect status has occurred. write 1000 to pmecr[5:2] to clear this bit 4 0x0 ro rxmpdis receive magic packet detect interrupt status when this bit is set, it indicates that receive magic packet detect status has occurred. write 0100 to pmecr[5:2] to clear this bit. 3 0x0 ro ldis linkup detect interrupt status downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 66 m9999-083109-2.0 bit default value r/w description when this bit is set, it indicates that wake-up from linkup detect status has occurred. write 0010 to pmecr[5:2] to clear this bit. 2 0x0 ro edis energy detect interrupt status when this bit is set and bit 2=1, bit 0=0 in ier register, it indicates that wake-up from energy detect status has occurred. when this bit is set and bit 2, 0=1 in ier register, it indicates that wake-up from delay energy detect status has occurred. write 0001 to pmecr[5:2] to clear this bit. 1 0x0 ro reserved 0 0x0 ro reserved 0x94 C 0x9b: reserved rx frame count & threshold register (0x9c C 0x9d): rxfctr this register indicates the current total amount of received frame count in rxq frame buffer and also is used to program the received frame count threshold. bit default value r/w description 15-8 0x00 ro rxfc rx frame count to indicate the total received frames in rxq frame buffer when receive interrupt (bit13=1 in isr) occurred and write 1 to clear this bit 13 in isr. the host cpu can start to read the updated receive frame header information in rxfhsr/rxfhbcr registers after read this rx frame count register. 7-0 0x00 rw rxfct receive frame count threshold to program received frame count threshold value. when bit 5 set to 1 in rxqcr register, the ksz8851m will set rx interrupt (bit 13 in isr) when the number of received frames in rxq buffer exceeds the threshold set in this register. tx next total frames size register (0x9e C 0x9f): txntfsr this register is used by the host cpu to program the total amount of txq buffer space requested for the next transmit. bit default value r/w description 15-0 0x0000 rw txntfs tx next total frames size the host cpu is used to program the total amount of txq buffer space which is required for next total transmit frames size in double-word count. when bit 1 (txq memory available monitor) is set to 1 in txqcr register, the ksz8851m will generate interrupt (bit 6 in isr register) to cpu when txq memory is available based upon the total amount of txq space requested by cpu at this register. mac address hash table register 0 (0xa0 C 0xa1): mahtr0 the 64-bit mac address table is used for group address filtering and it is enabled by selecting item 5 hash perfect mode in table 3 (address filtering scheme). this value is defined as the six most significant bits from crc circuit calculation result that is based on 48-bit of da input . the two most significant bits select one of the four registers to be used, while the others determine whic h bit within the register. multicast table register 0. bit default value r/w description 15-0 0x0 rw ht0 hash table 0 when the appropriate bit is set, if the packet received with da matches the crc, the hashing function is received without being filtered. when the appropriate bit is cleared, the packet will drop. mac address hash table register 1 (0xa2 C 0xa3): mahtr1 multicast table register 1. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 67 m9999-083109-2.0 bit default value r/w description 15-0 0x0 rw ht1 hash table 1 when the appropriate bit is set, if the packet received with da matches the crc, the hashing function is received without being filtered. when the appropriate bit is cleared, the packet will drop. note: when the receive all (rxae) or receive multicast (rxme) bit is set in the rxcr1, all multicast addresses are received regardless of the multicast table value. mac address hash table register 2 (0xa4 C 0xa5): mahtr2 multicast table register 2. bit default value r/w description 15-0 0x0 rw ht2 hash table 2 when the appropriate bit is set, if the packet received with da matches the crc, the hashing function is received without being filtered. when the appropriate bit is cleared, the packet will drop. note: when the receive all (rxae) or receive multicast (rxme) bit is set in the rxcr1, all multicast addresses are received regardless of the multicast table value. mac address hash table register 3 (0xa6 C 0xa7): mahtr3 multicast table register 3. bit default value r/w description 15-0 0x0 rw ht3 hash table 3 when the appropriate bit is set, if the packet received with da matches the crc, the hashing function is received without being filtered. when the appropriate bit is cleared, the packet will drop. note: when the receive all (rxae) or receive multicast (rxme) bit is set in the rxcr1, all multicast addresses are received regardless of the multicast table value. 0xa8 C 0xaf: reserved flow control low watermark register (0xb0 C 0xb1): fclwr this register is used to control the flow control for low watermark in qmu rx queue. bit default value r/w description 15-12 - rw reserved 11-0 0x0500 rw fclwc flow control low watermark configuration these bits are used to define the qmu rx queue low watermark configuration. it is in double words count and default is 5.12 kbyte available buffer space out of 12 kbyte. flow control high watermark register (0xb2 C 0xb3): fchwr this register is used to control the flow control for high watermark in qmu rx queue. bit default value r/w description 15-12 - rw reserved 11-0 0x0300 rw fchwc flow control high watermark configuration these bits are used to define the qmu rx queue high watermark configuration. it is in double words count and default is 3.072 kbyte available buffer space out of 12 kbyte. flow control overrun watermark register (0xb4 C 0xb5): fcowr this register is used to control the flow control for overrun watermark in qmu rx queue bit default value r/w description 15-12 - rw reserved 11-0 0x0040 rw fclwc flow control overr un watermark configuration downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 68 m9999-083109-2.0 these bits are used to define the qmu rx queue overrun watermark configuration. it is in double words count and default is 256 bytes available buffer space out of 12 kbyte. 0xb6 C 0xbf: reserved chip id and enable register (0xc0 C 0xc1): cider this register contains the chip id and the chip enable bit. bit default r/w description 15-8 0x88 ro family id chip family id 7-4 0x7 ro chip id 0x7 is assigned to ksz8851-16/32mql 3-1 0x1 ro revision id 0 0x0 rw reserved 0xc2 C 0xc5: reserved chip global control register (0xc6 C 0xc7): cgcr this register contains the global control for the chip function. bit default r/w description 15 0x0 rw ledsel1 see description for bit 9. 14-12 0x0 rw reserved. 11-10 0x2 rw reserved. 9 0x0 rw ledsel0 this bit sets the ledsel0 selection and bit 15 sets the ledsel1 selection. phy port led indicators, defined as below: [ledsel1 (bit15), ledsel0 (bit9)] [0, 0] [0, 1] p1led3 ------ ------ p1led2 link/act 100link/act p1led1 full_dpx/col 10link/act p1led0 speed full_dpx [ledsel1, ledsel0] [1, 0] [1, 1] p1led3 act na p1led2 link na p1led1 full_dpx/col na p1led0 speed na 8 0x0 r/w reserved. 7-0 0x35 rw reserved. indirect access control register (0xc8 C 0xc9): iacr this register contains the indirect control for the mib counter (write iacr triggers a command. read access is determined by bit 12). bit default r/w description 15-13 0x0 rw reserved . 12 0x0 rw read enable. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 69 m9999-083109-2.0 1 = read cycle is enabled (mib counter will clear after read). 0 = no operation. 11-10 0x0 rw table select 00 = reserved. 01 = reserved. 10 = reserved. 11 = mib counter selected. 9-5 - rw reserved. 4-0 0x00 rw indirect address bit 4-0 of indirect address for 32 mib counter locations. 0xca C 0xcf: reserved indirect access data low register (0xd0 C 0xd1): iadlr this register contains the indirect data (low word) for mib counter. bit default r/w description 15-0 0x0000 rw indirect low word data bit 15-0 of indirect data. indirect access data high register (0xd2 C 0xd3): iadhr this register contains the indirect data (high word) for mib counter. bit default r/w description 15-0 0x0000 rw indirect high word data bit 31-16 of indirect data. power management event control register (0xd4 C 0xd5): pmecr this register is used to control the ksz8851m power management event, capabilities and status. bit default r/w description 15 - ro reserved . 14 0 rw pme delay enable this bit is used to enable the delay of pme output pin assertion. when this bit is set to 1, the device will not assert the pme output till the devices all clocks are running and ready for host access. when this bit is set to 0, the device will assert the pme output without delay. this bit is only valid when auto wake-up enable (bit7) is set to 1 in this register. 13 0 rw reserved 12 0 rw pme output polarity this bit is used to control the pme output pin polarity. when this bit is set to 1, the pme output pin is active high. when this bit is set to 0, the pme output pin is active low. 11-8 0x0 rw wake-on-lan to pme output enable these four bits are used to enable the pme output pin asserted when one of these wake- on-lan events is detected: bit 11: is corresponding to receive wake-up frame. bit 10: is corresponding to receive magic packet. bit 9: is corresponding to link change from down to up. bit 8: is corresponding to signal energy detected. when the bit is set to 1, the pme pin will be asserted when a corresponding wake-on- lan event is occurred. when this bit is set to 0, the pme pin will be not asserted when a corresponding wake- on-lan event is occurred. 7 0 rw auto wake-up enable downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 70 m9999-083109-2.0 bit default r/w description this bit is used to enable automatically wake-up from low power state to normal power state in energy detect mode if carrier (signal energy) is present more than wake-up time in gswutr register. during the normal power state, the device can receive and transmit packets. when this bit is set to 1, the auto wake-up is enabled in energy detect mode. when this bit is set to 0, the auto wake-up is disabled in energy detect mode. 6 0 rw wake-up to normal operation mode this bit is used to control the device wake-up from low power state in energy detect mode to normal operation mode if signal energy is detected longer than the programmed wake- up time in gswutr register. when this bit is set to 1, the device will automatically go to the normal operation mode from energy detect mode. when this bit is set to 0, the device will not automatically go to the normal mode from energy detect mode. this bit is only valid when auto wake-up enable (bit7) is set to 1. 5-2 0x0 ro (w1c) wake-up event indication these four bits are used to indicate the ksz8851m wake-up event status as below: 0000: no wake-up event. 0001: wake-up from energy event detected. (bit 2 also set to 1 in isr register) 0010: wake-up from link up event detected. (bit 3 also set to 1 in isr register) 0100: wake-up from magic packet event detected. 1000: wake-up from wakeup frame event detected. if wake-on-lan to pme output enable bit[11:8] are set, the ksz8851m also asserts the pme pin. these bits are cleared on power up reset or by write 1. it is not modified by either hardware or software reset. when these bits are cleared, the ksz8851m deasserts the pme pin. 1-0 0x0 rw power management mode these two bits are used to control the ksz8851m power management mode as below: 00: normal operation mode. 01: energy detect mode. (two states in this mode either low power or normal power) 10: soft power down mode. 11: power saving mode. in energy detect mode under low power state, it can wake-up to normal operation mode either from line or host wake-up (host cpu issues a read cycle to grr register). in soft power down mode, it can wake-up to normal operation mode only from host wake- up (host cpu issues a read cycle to grr register). go-sleep & wake-up time register (0xd6 C 0xd7): gswutr this register contains the value which is used to control minimum go-sleep time period when the device from normal power state to low power state or to control minimum wake-up time period when the device from low power s tate to normal power state in energy detect mode. bit default r/w description 15-8 0x08 rw wake-up time this value is used to control the minimum period that the energy has to be detected consecutively before the device is waked-up from the low power state. the unit is 16 ms +/- 80%, the default wake-up time is 128 ms (16ms x 8). zero time (0x00) is not allowed. 7-0 0x0c rw go-sleep time this value is used to control the minimum period that the no energy event has to be detected consecutively before the device enters the low power state when the energy detect mode is on. the unit is 1 sec +/-80%, the default go-sleep time is 12 sec (1s x 12). zero time (0x00) is not allowed. phy reset register (0xd8 C 0xd9): phyrr this register contains a control bit to reset phy block when write an 1. bit default r/w description downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 71 m9999-083109-2.0 15-1 - rw reserved . 0 0 wo (self clear) phy reset bit this bit is write only and self clear after write an 1, it is used to reset phy block circuitry. 0xda C 0xdf: reserved 0xe0 C 0xe3: reserved phy 1 mii-register basic contro l register (0xe4 C 0xe5): p1mbcr this register contains media independent interface (mii) register for port 1 as defined in the ieee 802.3 specification. bit default r/w description bit is same as: 15 0 ro reserved 14 0 rw local (far-end) loopback (llb) 1 = perform local loopback at host (host tx -> phy -> host rx, see figure 11) 0 = normal operation 13 1 rw force 100 1 = force 100mbps if an is disabled (bit 12) 0 = force 10mbps if an is disabled (bit 12) bit 6 in p1cr 12 1 rw an enable 1 = auto-negotiation enabled. 0 = auto-negotiation disabled. bit 7 in p1cr 11-10 0 rw reserved 9 0 rw restart an 1 = restart auto-negotiation. 0 = normal operation. bit 13 in p1cr 8 1 rw force full duplex 1 = force full duplex 0 = force half duplex. if an is disabled (bit 12) or an is enabled but failed. bit 5 in p1cr 7-6 0 ro reserved 5 1 r/w hp_mdix 1 = hp auto mdi-x mode. 0 = micrel auto mdi-x mode. bit 15 in p1sr 4 0 rw force mdi-x 1 = force mdi-x. 0 = normal operation. bit 9 in p1cr 3 0 rw disable mdi-x 1 = disable auto mdi-x. 0 = normal operation. bit 10 in p1cr 2 0 rw reserved . 1 0 rw disable transmit 1 = disable transmit. 0 = normal operation. bit 14 in p1cr 0 0 rw disable led 1 = disable all leds. 0 = normal operation. bit 15 in p1cr downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 72 m9999-083109-2.0 phy 1 mii-register basic status register (0xe6 C 0xe7): p1mbsr this register contains the mii register status for the chip function. bit default r/w description bit is same as: 15 0 ro t4 capable 1 = 100 base-t4 capable. 0 = not 100 base-t4 capable. 14 1 ro 100 full capable 1 = 100base-tx full-duplex capable. 0 = not 100base-tx full duplex.capable. 13 1 ro 100 half capable 1= 100base-tx half-duplex capable. 0= not 100base-tx half-duplex capable. 12 1 ro 10 full capable 1 = 10base-t full-duplex capable. 0 = not 10base-t full-duplex capable. 11 1 ro 10 half capable 1 = 10base-t half-duplex capable. 0 = not 10base-t half-duplex capable. 10-7 0x0 ro reserved. 6 0 ro preamble suppressed not supported. 5 0 ro an complete 1 = auto-negotiation complete. 0 = auto-negotiation not completed. bit 6 in p1sr 4 0 ro reserved 3 1 ro an capable 1 = auto-negotiation capable. 0 = not auto-negotiation capable. 2 0 ro link status 1 = link is up. 0 = link is down. bit 5 in p1sr 1 0 ro jabber test not supported. 0 0 ro extended capable 1 = extended register capable. 0 = not extended register capable. phy 1 phy id low register (0xe8 C 0xe9): phy1ilr this register contains the phy id (low) for the chip. bit default r/w description 15-0 0x1430 ro phyid low low order phyid bits. phy 1 phy id high register (0xea C 0xeb): phy1ihr this register contains the phy id (high) for the chip. bit default r/w description 15-0 0x0022 ro phyid high high order phyid bits. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 73 m9999-083109-2.0 phy 1 auto-negotiation advertisement register (0xec C 0xed): p1anar this register contains the auto-negotiation advertisement for the phy function. bit default r/w description bit is same as: 15 0 ro next page not supported. 14 0 ro reserved 13 0 ro remote fault not supported. 12-11 0x0 ro reserved 10 1 rw pause (flow control capability) 1 = advertise pause capability. 0 = do not advertise pause capability. bit 4 in p1cr 9 0 rw reserved . 8 1 rw adv 100 full 1 = advertise 100 full-duplex capability. 0 = do not advertise 100 full-duplex capability bit 3 in p1cr 7 1 rw adv 100 half 1= advertise 100 half-duplex capability. 0 = do not advertise 100 half-duplex capability. bit 2 in p1cr 6 1 rw adv 10 full 1 = advertise 10 full-duplex capability. 0 = do not advertise 10 full-duplex capability. bit 1 in p1cr 5 1 rw adv 10 half 1 = advertise 10 half-duplex capability. 0 = do not advertise 10 half-duplex capability. bit 0 in p1cr 4-0 0x01 ro selector field 802.3 phy 1 auto-negotiation link partner ability register (0xee C 0xef): p1anlpr this register contains the auto-negotiation link partner ability for the chip function. bit default r/w description bit is same as: 15 0 ro next page not supported. 14 0 ro lp ack not supported. 13 0 ro remote fault not supported. 12-11 0x0 ro reserved 10 0 ro pause link partner pause capability. bit 4 in p1sr 9 0 ro reserved . 8 0 ro adv 100 full link partner 100 full capability. bit 3 in p1sr 7 0 ro adv 100 half link partner 100 half capability. bit 2 in p1sr 6 0 ro adv 10 full link partner 10 full capability. bit 1 in p1sr downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 74 m9999-083109-2.0 bit default r/w description bit is same as: 5 0 ro adv 10 half link partner 10 half capability. bit 0 in p1sr 4-0 0x01 ro reserved . 0xf0 C 0xf3: reserved port 1 phy special control/status, linkmd ? (0xf4 C 0xf5): p1sclmd this register contains the special control, status and linkmd ? information of phy1. bit default r/w description bit is same as: 15 0 ro reserved 14-13 0x0 ro vct_result vct result. [00] = normal condition. [01] = open condition has been detected in cable. [10] = short condition has been detected in cable. [11] = cable diagnostic test is failed. 12 0 rw (self-clear) vct_en vct enable. 1 = the cable diagnostic test is enabled. it is self- cleared after the vct test is done. 0 = it indicates the cable diagnostic test is completed and the status information is valid for read. 11 0 rw force_lnk force link. 1 = force link pass. 0 = normal operation. 10 0 ro reserved 9 0 rw remote (near-end) loopback (rlb) 1 = perform remote loopback at phy (rxp1/rxm1 -> txp1/txm1, see figure 11) 0 = normal operation 8-0 0x000 ro vct_fault_count vct fault count. distance to the fault. its approximately 0.4m*vct_fault_count. port 1 control register (0xf6 C 0xf7): p1cr this register contains the global per port control for the chip function. bit default r/w description bit is same as: 15 0 rw led off 1 = turn off all of the port 1 leds (p1led3, p1led2, p1led1, p1led0). these pins are driven high if this bit is set to one. 0 = normal operation. bit 0 in p1mbcr 14 0 rw txids 1 = disable the ports transmitter. 0 = normal operation. bit 1 in p1mbcr 13 0 rw restart an bit 9 in p1mbcr downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 75 m9999-083109-2.0 bit default r/w description bit is same as: 1 = restart auto-negotiation. 0 = normal operation. 12 0 rw reserved 11 0 rw reserved 10 0 rw disable auto mdi/mdi-x 1 = disable auto mdi/mdi-x function. 0 = enable auto mdi/mdi-x function. bit 3 in p1mbcr 9 0 rw force mdi-x 1= if auto mdi/mdi-x is disabled, force phy into mdi-x mode. 0 = do not force phy into mdi-x mode. bit 4 in p1mbcr 8 0 rw reserved 7 1 rw auto negotiation enable 1 = auto negotiation is enabled. 0 = disable auto negotiation, speed, and duplex are decided by bits 6 and 5 of the same register. bit 12 in p1mbcr 6 1 rw force speed 1 = force 100bt if an is disabled (bit 7). 0 = force 10bt if an is disabled (bit 7). bit 13 in p1mbcr 5 1 rw force duplex 1 = force full duplex if (1) an is disabled or (2) an is enabled but failed. 0 = force half duplex if (1) an is disabled or (2) an is enabled but failed. bit 8 in p1mbcr 4 1 rw advertised flow control capability. 1 = advertise flow control (pause) capability. 0 = suppress flow control (pause) capability from transmission to link partner. bit 10 in p1anar 3 1 rw advertised 100bt full-duplex capability. 1 = advertise 100bt full-duplex capability. 0 = suppress 100bt full-duplex capability from transmission to link partner. bit 8 in p1anar 2 1 rw advertised 100bt half-duplex capability. 1 = advertise 100bt half-duplex capability. 0 = suppress 100bt half-duplex capability from transmission to link partner. bit 7 in p1anar 1 1 rw advertised 10bt full-duplex capability. 1 = advertise 10bt full-duplex capability. 0 = suppress 10bt full-duplex capability from transmission to link partner. bit 6 in p1anar 0 1 rw advertised 10bt half-duplex capability. 1 = advertise 10bt half-duplex capability. 0 = suppress 10bt half-duplex capability from transmission to link partner. bit 5 in p1anar downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 76 m9999-083109-2.0 port 1 status register (0xf8 C 0xf9): p1sr this register contains the phy port status for the chip function. bit default r/w description bit is same as: 15 1 rw hp_mdix 1 = hp auto mdi-x mode. 0 = micrel auto mdi-x mode. bit 5 in p1mbcr 14 0 ro reserved 13 0 ro polarity reverse 1 = polarity is reversed. 0 = polarity is not reversed. 12-11 0 ro reserved 10 0 ro operation speed 1 = link speed is 100mbps. 0 = link speed is 10mbps. 9 0 ro operation duplex 1 = link duplex is full. 0 = link duplex is half. 8 0 ro reserved 7 1 ro mdi-x status 1 = mdi. 0 = mdi-x. 6 0 ro an done 1 = an done. 0 = an not done. bit 5 in p1mbsr 5 0 ro link good 1= link good. 0 = link not good. bit 2 in p1mbsr 4 0 ro partner flow control capability. 1 = link partner flow control (pause) capable. 0 = link partner not flow control (pause) capable. bit 10 in p1anlpr 3 0 ro partner 100bt full-duplex capability. 1 = link partner 100bt full-duplex capable. 0 = link partner not 100bt full-duplex capable. bit 8 in p1anlpr 2 0 ro partner 100bt half-duplex capability. 1 = link partner 100bt half-duplex capable. 0= link partner not 100bt half-duplex capable. bit 7 in p1anlpr 1 0 ro partner 10bt full-duplex capability. 1= link partner 10bt full-duplex capable. 0 = link partner not 10bt full-duplex capable. bit 6 in p1anlpr 0 0 ro partner 10bt half-duplex capability. 1 = link partner 10bt half-duplex capable. 0 = link partner not 10bt half-duplex capable. bit 5 in p1anlpr 0xfa C 0xff: reserved downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 77 m9999-083109-2.0 mib (management information base) counters the ksz8851m provides 32 mib counters to monitor the port activity for network management. the mib counters are formatted as shown below: bit name r/w description default 31-0 counter values ro counter value (read clear) 0x00000000 table 13. format of mib counters ethernet port mib counters are read using indirect memory access. the address offset range is 0x00 to 0x1f. offset counter name description 0x0 rxbyte rx octet count including bad packets 0x1 reserved reserved. 0x2 rxundersizepkt rx undersize packets w/ good crc 0x3 rxfragments rx fragment packets w/ bad crc, symbol errors or alignment errors 0x4 rxoversize rx oversize packets w/ good crc (max: 1536 bytes) 0x5 rxjabbers rx packets longer than 1536 bytes w/ either crc errors, alignment errors, or symbol errors 0x6 rxsymbolerror rx packets w/ invalid data symbol and legal packet size. 0x7 rxcrcerror rx packets within (64,2000) bytes w/ an integral number of bytes and a bad crc 0x8 rxalignmenterror rx packets within (64,2000) bytes w/ a non-integral number of bytes and a bad crc 0x9 rxcontrol8808pkts number of mac control frames received by a port with 88-08h in ethertype field 0xa rxpausepkts number of pause frames received by a port. pause frame is qualified with ethertype (88- 08h), da, control opcode (00-01), data length (64b min), and a valid crc 0xb rxbroadcast rx good broadcast packets (not including error broadcast packets or valid multicast packets) 0xc rxmulticast rx good multicast packets (not including mac control frames, error multicast packets or valid broadcast packets) 0xd rxunicast rx good unicast packets 0xe rx64octets total rx packets (bad packets included) that were 64 octets in length 0xf rx65to127octets total rx packets (bad packets included) that are between 65 and 127 octets in length 0x10 rx128to255octets total rx packets (bad packets included) that are between 128 and 255 octets in length 0x11 rx256to511octets total rx packets (bad packets included) that are between 256 and 511 octets in length 0x12 rx512to1023octets total rx packets (bad packets included) that are between 512 and 1023 octets in length 0x13 rx1024to1521octets total rx packets (bad packets included) that are between 1024 and 1521 octets in length 0x14 rx1522to2000octets total rx packets (bad packets included) that are between 1522 and 2000 octets in length 0x15 txbyte tx good octet count, including pause packets 0x16 txlatecollision the number of times a collision is detected later than 512 bit-times into the tx of a packet 0x17 txpausepkts number of pause frames transmitted by a port 0x18 txbroadcastpkts tx good broadcast packets (not incl uding error broadcast or valid multicast packets) 0x19 txmulticastpkts tx good multicast packets (not including error multicast packets or valid broadcast packets) 0x1a txunicastpkts tx good unicast packets 0x1b txdeferred tx packets by a port for which the 1st tx attempt is delayed due to the busy medium 0x1c txtotalcollision tx total collision, half duplex only downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 78 m9999-083109-2.0 offset counter name description 0x1d txexcessivecollision a count of frames for which tx fails due to excessive collisions 0x1e txsinglecollision successfully tx frames on a port for which tx is inhibited by exactly one collision 0x1f txmultiplecollision successfully tx frames on a port for which tx is inhibited by more than one collision table 14. port 1 mib counters indirect memory offsets example: 1. mib counter read (read port 1 rx64octets counter at indirect address offset 0x0e) write to reg. iacr (0xc8) with 0x1c0e (set indirect address and trigger a read mib counters operation) then read reg. iadhr (mib counter value 31-16) read reg. iadlr (mib counter value 15-0) additional mib information in the heaviest condition, the byte counter will overflow in 2 minutes. it is recommended that the software read all the counters at least every 30 seconds. mib counters are designed as read clear. that is, these counters will be cleared after they are read. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 79 m9999-083109-2.0 absolute maximum ratings (1) supply voltage (vddatx, vddarx, vddio) ... C0.5v to +4.0v input voltage (all inputs).............................. C0.5v to +4.0v output voltage (all outputs) ........................ C0.5v to +4.0v lead temperature (soldering, 20sec.) ....................... 260c storage temperature (t s ) ......................... C65c to +150c maximum junction temperature (t j )....................... +125c hbm esd rating .......................................................... 6kv operating ratings (2) supply voltage vddatx, vddarx............................ +3.1v to +3.5v vddio (3.3v) ..................................... +3.1v to +3.5v vddio (2.5v) ................................. +2.35v to +2.65v vddio (1.8v) ..................................... +1.7v to +1.9v ambient operating temperature (t a ) commercial (mql).......0c to +70c industrial (mqli)....-40c to +85c thermal resistance (3) junction-to-ambient ( ja )....................42.91c/w junction-to-case ( jc )...........................19.6c/w electrical characteristics (4, 5) symbol parameter condition min typ max units supply current for 100base-tx operation (single port@100% utilization) vddatx, vddarx, vddio = 3.3v; chip only (no transformer) 85 ma vddatx/vddarx = 3.3v, vddio = 2.5v; chip only (no transformer) 85 ma i dd1 100base-tx (analog core + pll + digital core + transceiver + digital i/o) vddatx/vddarx = 3.3v, vddio = 1.8v; chip only (no transformer) 85 ma supply current for 10base-t operation (single port@100% utilization) vddatx, vddarx, vddio = 3.3v; chip only (no transformer) 75 ma vddatx/vddarx = 3.3v, vddio = 2.5v; chip only (no transformer) 75 ma i dd2 10base-t (analog core + pll + digital core + transceiver + digital i/o) vddatx/vddarx = 3.3v, vddio = 1.8v; chip only (no transformer) 75 ma power management mode i dd3 power saving mode (6) ethernet cable disconnected & auto-neg 70 ma i dd4 soft power down mode set bit [1:0] = 10 in pmecr register 2 ma i dd5 energy detect mode at low power state 2 ma i dd6 hardware power down mode pwrdn (pin36) is tied to low 0.5 ma ttl inputs (vddio = 3.3v/2.5v/1.8v) v ih input high voltage 2.0/2.0 /1.3 v v il input low voltage 0.8/0.6 /0.3 v i in input current v in = gnd ~ vddio -10 10 a ttl outputs (vddio = 3.3v/2.5v/1.8v) v oh output high voltage i oh = -8ma 2.4/1.9 /1.5 v v ol output low voltage i ol = 8ma 0.4/0.4 /0.2 v |i oz | output tri-state leakage 10 a notes: 1. exceeding the absolute maximum rating may damage the device. 2. the device is not guaranteed to function outside its operating rating. unused inputs must always be tied to a appropria te logic voltage level (ground to vddio). downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 80 m9999-083109-2.0 electrical characteristics (4, 5) symbol parameter condition min typ max units 100basetx transmit (measured differentially after 1:1 transformer) v o peak differential output voltage 100 termination on the diff. output 0.95 1.05 v v imb output voltage imbalance 100 termination on the diff. output 2 % t r, / t f rise/fall time 3 5 ns rise/fall time imbalance 0 0.5 ns duty cycle distortion 0.25 ns overshoot 5 % v set reference voltage of iset 0.5 v output jitter peak-to-peak 0.7 1.4 ns 10baset receive v sq squelch threshold 5mhz square wave 400 mv 10baset transmit (measured differentially after 1:1 transformer) v p peak differential output voltage 100 termination on the differential output 2.2 2.5 2.8 v jitter added 100 termination on the differential output (peak-to-peak) 1.8 3.5 ns table 15. electrical characteristics notes: 3. no (hs) heat spreader in this package. the jc / ja is under air velocity 0m/s. 4. t a = 25c. specification for packaged product only. 5. single ports transformer consumes an additional 45ma @3.3v for 100base-tx and 70ma @3.3v for 10base-t. 6. single ports transformer consumes less than 1ma during the power saving mode. downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 81 m9999-083109-2.0 timing specifications asynchronous read and write timing figure 12. asynchronous cycle symbol parameter min typ max unit t1 a1-a7, aen, bexn[3:0] valid to rdn, wrn active 0 ns t2 a1-a7, aen, bexn[3:0] hold after rdn, wrn inactive 0 ns t3 read data valid to ardy rising 0.5 ns t4 rdn inactive to read data invalid 1 2 ns wrn active to write data valid (bit12=0 in rxfdpr) 8 16 ns t5 wrn active to write data valid (bit12=1 in rxfdpr) 4 ns t6 read or write active to ardy low 8 ns t7 ardy low (wait time) 24 ns read active time (low) 40 ns t8 write active time (low) 40 ns read inactive time (high) 10 ns t9 write inactive time (high) 10 ns table 16. asynchronous cycle timing parameters t5 t1 t4 t3 t2 valid valid valid addr, aen, bexn read data rdn, wrn write data t6 ardy t7 t9 t8 downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 82 m9999-083109-2.0 address latching timing for all modes figure 13. address latching cycle for all modes symbol parameter min typ max unit t1 a1-a7, aen to ldevn delay 5 ns table 17. address latching timing parameters t1 a ddress, aen, bexn ldevn downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 83 m9999-083109-2.0 auto negotiation timing figure 14. auto negotiation timing timing parameter description min typ max unit t btb flp burst to flp burst 8 16 24 ms t flpw flp burst width 2 ms t pw clock/data pulse width 100 ns t ctd clock pulse to data pulse 55.5 64 69.5 s t ctc clock pulse to clock pulse 111 128 139 s number of clock/data pulses per burst 17 33 table 18. auto negotiation timing parameters downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 84 m9999-083109-2.0 reset timing as long as the stable supply voltages to reset high timing (minimum of 10ms) are met, there is no power-sequencing requirement for the ksz8851m supply voltages (3.3v). the reset timing requirement is summarized in the figure 15 and table 19. figure 15. reset timing symbol parameter min max unit t sr stable supply voltages to reset high 10 ms table 19. reset timing parameters supply voltage rstn tsr downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 85 m9999-083109-2.0 eeprom timing eesk eecs eedi eedo high-z d15 d14 d13 d1 d0 an a0 0 11 1 *1 *1 start bit tcyc ts th figure 16. eeprom read cycle timing diagram timing parameter description min typ max unit tcyc clock cycle 0.8 (obcr[1:0]=00 on-chip bus speed @ 125 mhz) s ts setup time 20 ns th hold time 20 ns table 20. eeprom timing parameters downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 86 m9999-083109-2.0 selection of isolation transformers a 1:1 isolation transformer is required at the line interface. an isolation transformer with integrated common-mode c hoke is recommended for exceeding fcc requirements. table 21 gives recommended transformer characteristics. parameter value test condition turns ratio 1 ct : 1 ct open-circuit inductance (min) 350 h 100mv, 100khz, 8ma leakage inductance (max) 0.4 h 1mhz (min) inter-winding capacitance (max) 12pf d.c. resistance (max) 0.9 insertion loss (max) 1.0db 0mhz C 65mhz hipot (min) 1500vrms table 21. transformer selection criteria magnetic manufacturer part number auto mdi-x number of port pulse h1102 yes 1 pulse (low cost) h1260 yes 1 transpower hb726 yes 1 bel fuse s558-5999-u7 yes 1 delta lf8505 yes 1 lankom lf-h41s yes 1 tdk (mag jack) tla-6t718 yes 1 table 22. qualified single port magnetics selection of reference crystal chacteristics value units frequency 25 mhz frequency tolerance (max) 50 ppm load capacitance (max) 20 pf series resistance 40 table 23. typical reference crystal characteristics downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 87 m9999-083109-2.0 package information figure 17. 128-pin pqfp package downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 88 m9999-083109-2.0 acronyms and glossary biu bus interface unit the host interface function that performs code conversion, buffering, and the like required for communications to and from a network. bpdu bridge protocol data unit a packet containing ports, addresses, etc. to make sure data being passed through a bridged network arrives at its proper destination. cmos complementary metal oxide semiconductor a common semiconductor manufacturing technique in which positive and negative types of transistors are combined to form a current gate that in turn forms an effective means of controlling electrical current through a chip. crc cyclic redundancy check a common technique for detecting data t ransmission errors. crc for ethernet is 32 bits long. cut-through switch a switch typically processes received packets by reading in the full packet (storing), then processing the packet to determine where it needs to go, then forwarding it. a cut-through switch simply reads in the first bit of an incoming packet and forwards the packet. cut- through switches do not store the packet. da destination address the address to send packets. dma direct memory access a design in which memory on a chip is controlled independently of the cpu. eeprom electronically erasable programmable read-only memo ry a design in which memory on a chip can be erased by exposing it to an electrical charge. eisa extended industry standard architecture a bus architecture designed for pcs using 80x86 processors, or an intel 80386, 80486 or pentium microprocessor. eisa buses are 32 bits wide and support multiprocessing. emi electro-magnetic interference a naturally occurring phenomena when the electromagnetic field of one device disrupts, impedes or degrades the electromagnetic field of another device by coming into proximity with it. in computer technology, computer devices are susceptible to emi because electromagnetic fields are a byproduct of passing electricity through a wire. data lines that have not been properly shielded are susceptible to data corruption by emi. fcs frame check sequence see crc. fid frame or filter id specifies the frame identifier. alternately is the filter identifier. igmp internet group management protocol the protocol defined by rfc 1112 for ip multicast transmissions. ipg inter-packet gap a time delay between successive data packets mandated by the network standard for protocol reasons. in ethernet, the medium has to be "silent" (i.e., no data transfer) for a short period of time before a node can consider the network idle and start to transmit. ipg is used to correct timing differences between a transmitter and receiver. during the ipg, no data is transferred, and information in the gap can be discarded or additions inserted without impact on data integrity. isi inter-symbol interference the disruption of transmitted code caused by adjacent pulses affecting or interfering with each other. isa industry standard architecture a bus architecture used in the ibm pc/xt and pc/at. jumbo packet a packet larger than the standard ethernet packet (1500 bytes). large packet sizes allow for more efficient use of bandwidth, lower overhead, less processing, etc. mdi medium dependent interface an ethernet port connection that allows network hubs or switches to connect to other hubs or switches without a null-modem, or crossover, cable. mdi provides the standard interface to a particular media (copper or fiber) and is therefore 'media dependent.' downloaded from: http:///
micrel, inc. ksz8851-16/32 mql/mqli august 2009 89 m9999-083109-2.0 mdi-x medium dependent interface crossover an ethernet port connection that allows networked end stations (i.e., pcs or workstations) to connect to each other using a null-modem, or crossover, cable. for 10/100 full-duplex networks, an end point (such as a computer) and a switch are wired so that each transmitter connects to the far end receiver. when connecting two computers together, a cable that crosses the tx and rx is required to do this. with auto mdi-x, the phy senses the correct tx and rx roles, eliminating any cable confusion. mib management information base the mib comprises the management portion of network devices. this can include things like monitoring traffic levels and faults (statistical), and can also change operating parameters in network nodes (static forwarding addresses). mii media independent interface the mii accesses phy registers as defined in the ieee 802.3 specification. nic network interface card an expansion board inserted into a computer to allow it to be connected to a network. most nics are designed for a particular type of network, protocol, and media, although some can serve multiple networks. npvid non port vlan id the port vlan id value is used as a vlan reference. pll phase-locked loop an electronic circuit that controls an oscillator so that it maintains a constant phase angle (i.e., lock) on the frequency of an input, or reference, signal. a pll ensures that a communication signal is locked on a specific frequency and can also be used to generate, modulate, and demodulate a signal and divide a frequency. pme power management event an occurrence that affects the directing of power to different components of a system. qmu queue management unit manages packet traffic between mac/phy interface and the system host. the qmu has built-in packet memories for receive and transmit functions called txq (transmit queue) and rxq (receive queue). sa source address the address from which information has been sent. tdr time domain reflectometry tdr is used to pinpoint flaws and problems in underground and aerial wire, cabling, and fiber optics. they send a signal down the conductor and measure the time it takes for the signal -- or part of the signal -- to return. utp unshielded twisted pair commonly a cable containing 4 twisted pairs of wires. the wires are twisted in such a manner as to cancel electrical interference generated in each wire, therefore shielding is not required. vlan virtual local area network a configuration of computers that acts as if all computers are connected by the same physical network but which may be located virtually anywhere. micrel, inc. 2180 fortune drive san jose, ca 95131 usa tel +1 (408) 944-0800 fax +1 (408) 474-1000 web http://www.micrel.com the information furnished by micrel in this data sheet is believed to be accurate and reliable. how ever, no responsibility is a ssumed by micrel for its use. micrel reserves the right to change circuitry and specifications at any time without notificat ion to the customer. micrel products are not designed or authorized for use as components in life support appliances, devices or s ystems where malfu nction of a product can reasonably be expected to result in personal injury. life support devices or systems are devices or systems that (a) are intend ed for surgical implant into the body or (b) support or sustain life, and whose failure to perform can be reasonably expected to result in a significa nt inj ury to the user. a purchasers use or sale of micrel products for use in life support appliances, devices or systems is a purchasers own risk and purchaser a grees to fully indemnify micrel for any damages resulting from such use or sale. ? 2008 micrel, incorporated. downloaded from: http:///


▲Up To Search▲   

 
Price & Availability of KSZ8851SNLI-TR

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X